@@ -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; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public static function findByNameOrCreate(string $name, TagType $type) : Tag |
| 33 | 33 | { |
| 34 | 34 | $existing = Tag::nonDraft()->get() |
| 35 | - ->first(function (int $id, Tag $tag) use ($name) { |
|
| 35 | + ->first(function(int $id, Tag $tag) use ($name) { |
|
| 36 | 36 | return $tag->translate('name', content_locale()) === $name; |
| 37 | 37 | }); |
| 38 | 38 | |
@@ -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); |