update deploy

This commit is contained in:
bulut
2026-03-27 10:41:54 +03:00
parent 69d19c0176
commit 6f6448aa06
422 changed files with 37956 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models\Concerns;
use Illuminate\Support\Str;
trait HasTurkishSlug
{
protected function slugSourceField(): string
{
return 'title';
}
protected static function bootHasTurkishSlug(): void
{
static::saving(function ($model): void {
if (empty($model->slug) && $model->{$model->slugSourceField()}) {
$model->slug = Str::turkishSlug($model->{$model->slugSourceField()});
} else {
$model->slug = Str::turkishSlug($model->slug);
}
});
}
}