first commit

This commit is contained in:
tanch0
2024-06-10 18:06:58 +05:45
commit c569ea1d0c
1953 changed files with 85451 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
namespace App\Models\Log;
use App\Models\User;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ActivityLog extends Model
{
use HasFactory;
protected $primaryKey = 'activity_id';
public $timestamps = true;
protected $fillable = [
'user_id',
'controllerName',
'methodName',
'actionUrl',
'activity',
'created_at',
'updated_at',
];
protected $appends = ['user_name'];
public function getUserNameAttribute()
{
$user = User::find($this->user_id);
return $user ? $user->name : '';
}
}