Files
Global-Jain/app/Models/KarmaPointsTransaction.php

45 lines
787 B
PHP
Raw Normal View History

2025-11-05 10:37:10 +05:30
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class KarmaPointsTransaction extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'pointable_id',
'pointable_type',
'user_id',
'message',
'points',
'key',
'trasaction_type',
'properties',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'properties' => 'json',
];
/**
* Get the parent pointable model.
*/
public function pointable()
{
return $this->morphTo();
}
}