feat: initial project setup with Laravel 12 and Filament v4

This commit is contained in:
SajjadMahmoody
2026-04-03 17:25:17 +03:30
parent eca5d74b36
commit 09ee1cb743
324 changed files with 78304 additions and 23 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\Traits;
use Illuminate\Support\Facades\Auth;
trait HasUserStamps
{
public static function bootHasUserStamps(): void
{
static::creating(function ($model) {
if (Auth::check()) {
$model->created_by = Auth::id();
$model->updated_by = Auth::id();
}
});
static::updating(function ($model) {
if (Auth::check()) {
$model->updated_by = Auth::id();
}
});
}
}