megahunt.test/app/Models/History.php

32 lines
547 B
PHP

<?php
namespace App\Models;
use App\HistoryAction;
use App\UuidId;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class History extends Model
{
use HasFactory;
use UuidId;
protected $fillable = [
'model_id',
'model_name',
'before',
'after',
'action',
];
protected function casts()
{
return [
'action' => HistoryAction::class,
'before' => 'array',
'after' => 'array',
];
}
}