@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public function scopeMorphable($query, string $morphkey = null) |
| 33 | 33 | { |
| 34 | 34 | return $query->withoutGlobalScope(static::globalMorphableScope()) |
| 35 | - ->where('morph_key', '=', $morphkey); |
|
| 35 | + ->where('morph_key', '=', $morphkey); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | { |
| 104 | 104 | $relations = static::where(function ($query) use ($type, $id) { |
| 105 | 105 | return $query->where('parent_type', $type) |
| 106 | - ->where('parent_id', $id); |
|
| 106 | + ->where('parent_id', $id); |
|
| 107 | 107 | })->orWhere(function ($query) use ($type, $id) { |
| 108 | 108 | return $query->where('child_type', $type) |
| 109 | 109 | ->where('child_id', $id); |
@@ -87,11 +87,11 @@ |
||
| 87 | 87 | return parent::fields()->add( |
| 88 | 88 | $this->pageBuilderField(), |
| 89 | 89 | InputField::make('title')->translatable($this->model->availableLocales()) |
| 90 | - ->validation('required-fallback-locale|max:200', [], [ |
|
| 91 | - 'trans.'.config('app.fallback_locale', 'nl').'.title' => 'title', |
|
| 92 | - ]) |
|
| 93 | - ->label('De titel van je '.$this->model->labelSingular ?? 'pagina') |
|
| 94 | - ->description('Dit is de titel die zal worden getoond in de overzichten en modules.'), |
|
| 90 | + ->validation('required-fallback-locale|max:200', [], [ |
|
| 91 | + 'trans.'.config('app.fallback_locale', 'nl').'.title' => 'title', |
|
| 92 | + ]) |
|
| 93 | + ->label('De titel van je '.$this->model->labelSingular ?? 'pagina') |
|
| 94 | + ->description('Dit is de titel die zal worden getoond in de overzichten en modules.'), |
|
| 95 | 95 | InputField::make('seo_title') |
| 96 | 96 | ->translatable($this->model->availableLocales()) |
| 97 | 97 | ->label('Zoekmachine titel'), |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | public static function getByModel(Model $model) |
| 66 | 66 | { |
| 67 | 67 | return static::where('model_type', $model->getMorphClass()) |
| 68 | - ->where('model_id', $model->id) |
|
| 69 | - ->get(); |
|
| 68 | + ->where('model_id', $model->id) |
|
| 69 | + ->get(); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | public static function findRecentRedirect(Model $model, string $locale): ?self |
@@ -134,9 +134,9 @@ discard block |
||
| 134 | 134 | if ($ignoredModel) { |
| 135 | 135 | $builder->whereNotIn('id', function ($query) use ($ignoredModel) { |
| 136 | 136 | $query->select('id') |
| 137 | - ->from('chief_urls') |
|
| 138 | - ->where('model_type', '=', $ignoredModel->getMorphClass()) |
|
| 139 | - ->where('model_id', '=', $ignoredModel->id); |
|
| 137 | + ->from('chief_urls') |
|
| 138 | + ->where('model_type', '=', $ignoredModel->getMorphClass()) |
|
| 139 | + ->where('model_id', '=', $ignoredModel->id); |
|
| 140 | 140 | }); |
| 141 | 141 | } |
| 142 | 142 | |