fix:edit logs error

This commit is contained in:
2026-08-22 15:13:20 +03:30
parent df49fa0765
commit f597da9614
5 changed files with 224 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ActivityLog extends Model
{
public $timestamps = false;
protected $fillable = [
'admin_id',
'model_type',
'model_id',
'action',
'changes',
'created_at',
];
protected $casts = [
'changes' => 'array',
'created_at' => 'datetime',
];
/**
* رابطه: هر لاگ متعلق به یک ادمین است.
*/
public function admin()
{
return $this->belongsTo(Admin::class);
}
}