Updated ERP with new modules and features

This commit is contained in:
Kwesi Banson
2026-09-22 08:06:31 +00:00
parent 71bc103fee
commit 5174e82e51
53 changed files with 3706 additions and 203 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ActivityLog extends Model
{
protected $fillable = [
'user_id', 'loggable_type', 'loggable_id', 'action',
'old_data', 'new_data', 'ip_address', 'user_agent'
];
protected $casts = [
'old_data' => 'array',
'new_data' => 'array',
];
// Links back to the User who made the change
public function user()
{
return $this->belongsTo(StaffMember::class);
}
// Links back to the affected Model (Client, Server, VpnConfig, etc.)
public function loggable()
{
return $this->morphTo();
}
}