git add .

git commit "feat: implement activity logging for tours and flights"
This commit is contained in:
2026-08-19 14:59:26 +03:30
parent 7cf68cc02f
commit 4d8839e802
9 changed files with 326 additions and 3 deletions
+49
View File
@@ -0,0 +1,49 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class ActivityLog
*
* @property int $id
* @property int|null $admin_id
* @property string $action
* @property string $model
* @property int $model_id
* @property string|null $description
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @package App\Models
*/
class ActivityLog extends Model
{
protected $table = 'activity_logs';
public static $snakeAttributes = false;
protected $casts = [
'admin_id' => 'int',
'model_id' => 'int'
];
protected $fillable = [
'admin_id',
'action',
'model',
'model_id',
'description'
];
public function admin()
{
return $this->belongsTo(Admin::class);
}
}
+4
View File
@@ -103,4 +103,8 @@ class Admin extends User
})
->exists();
}
public function activityLogs()
{
return $this->hasMany(ActivityLog::class);
}
}