@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Models; |
| 4 | 4 | |
| 5 | -use App\Foundation\Models\Base\TranslatableEloquent; |
|
| 6 | 5 | use App\Foundation\Models\Traits\Presentable; |
| 7 | 6 | use Illuminate\Database\Eloquent\Model; |
| 8 | 7 | use Spatie\Translatable\HasTranslations; |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public static function bootHasUrl() |
| 8 | 8 | { |
| 9 | - static::saving(function ($model) { |
|
| 9 | + static::saving(function($model) { |
|
| 10 | 10 | |
| 11 | 11 | if (!in_array('name', $model->translatable ?? [])) { |
| 12 | 12 | $model->url = str_slug($model->name); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public static function findByNameOrCreate(string $name, TagType $type) : Tag |
| 35 | 35 | { |
| 36 | 36 | $existing = Tag::nonDraft()->get() |
| 37 | - ->first(function (Tag $tag) use ($name) { |
|
| 37 | + ->first(function(Tag $tag) use ($name) { |
|
| 38 | 38 | return $tag->translate('name', content_locale()) === $name; |
| 39 | 39 | }); |
| 40 | 40 | |