|null $context * @property Carbon $created_at */ class ActivityLog extends Model { protected $table = 'activity_log'; // Log entries are immutable: created_at only, written by the logger. public $timestamps = false; protected $guarded = []; protected function casts(): array { return [ 'action' => Action::class, 'origin' => ActivityOrigin::class, 'context' => 'json', 'created_at' => 'datetime', ]; } /** * @return MorphTo */ public function subject(): MorphTo { return $this->morphTo(); } }