- Remove unused FeaturesController (empty stubs, no routes) - Remove ConvertSpatialFile CLI command (unused; service used in LayerManager) - Remove MigrateGeojsonToFeatures CLI command (one-shot migration, not referenced) - Remove .claude/worktrees/ (11 old agent worktrees from June) - Apply Laravel Pint formatting across 219 files (style only, no functional changes) Tests: 101 passing (319 assertions) API routes: unchanged (8 routes intact)
24 lines
492 B
PHP
24 lines
492 B
PHP
<?php
|
|
|
|
namespace App\Traits;
|
|
|
|
use App\Models\ActivityLog;
|
|
|
|
trait LogsActivity
|
|
{
|
|
public static function bootLogsActivity(): void
|
|
{
|
|
static::created(function ($model) {
|
|
ActivityLog::record('created', $model);
|
|
});
|
|
|
|
static::updated(function ($model) {
|
|
ActivityLog::record('updated', $model, $model->getDirty());
|
|
});
|
|
|
|
static::deleted(function ($model) {
|
|
ActivityLog::record('deleted', $model);
|
|
});
|
|
}
|
|
}
|