34 lines
621 B
PHP
34 lines
621 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ActivityLog extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public const UPDATED_AT = null;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'model_type',
|
|
'model_id',
|
|
'action',
|
|
'description',
|
|
'ip_address',
|
|
'created_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|