megahunt.test/app/Models/History.php

32 lines
547 B
PHP
Raw Permalink Normal View History

2024-08-29 23:50:29 +02:00
<?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
{
2024-08-30 09:37:24 +02:00
use HasFactory;
use UuidId;
2024-08-29 23:50:29 +02:00
protected $fillable = [
'model_id',
'model_name',
'before',
'after',
'action',
];
protected function casts()
{
return [
'action' => HistoryAction::class,
'before' => 'array',
'after' => 'array',
];
}
}