feat: initialize Dr-Panel project with patient file number support

This commit is contained in:
SajjadMahmoody
2026-05-06 02:18:23 +03:30
parent f8f174690a
commit 8b84d1780f
460 changed files with 113960 additions and 1 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();
}
});
}
}