initial commit

This commit is contained in:
2026-06-08 19:58:50 +07:00
commit f7da9c6f78
154 changed files with 19586 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Log extends Model
{
protected $fillable = ['user_id', 'action', 'model', 'model_id', 'changes', 'description', 'is_success', 'timestamp'];
/**
* Relationship with User
*/
public function user()
{
return $this->belongsTo(User::class);
}
/**
* Dynamically resolve the related model instance
*/
public function relatedModel()
{
if (!class_exists($this->model)) {
return null;
}
return $this->model::find($this->model_id);
}
}