You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
631 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class AuditLog extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'username',
'role',
'method',
'path',
'action',
'status_code',
'ip',
'user_agent',
'request_payload',
];
protected $casts = [
'request_payload' => 'array',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}