migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace Modules\RestaurantDelivery\Traits;
use Illuminate\Support\Str;
trait HasUuid
{
public static function bootHasUuid(): void
{
static::creating(function ($model) {
if (empty($model->uuid)) {
$model->uuid = (string) Str::uuid();
}
});
}
public function getRouteKeyName(): string
{
return 'uuid';
}
public static function findByUuid(string $uuid): ?static
{
return static::where('uuid', $uuid)->first();
}
public static function findByUuidOrFail(string $uuid): static
{
return static::where('uuid', $uuid)->firstOrFail();
}
}