@@ -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); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | // Add description to wildcard field only when there are locale values. |
| 41 | 41 | $wildCardField->label('Default link') |
| 42 | - ->description('Standaard link die altijd van toepassing is indien er geen taalspecifieke link voorhanden is. Laat deze leeg indien je deze link in bepaalde talen niet wilt beschikbaar maken.'); |
|
| 42 | + ->description('Standaard link die altijd van toepassing is indien er geen taalspecifieke link voorhanden is. Laat deze leeg indien je deze link in bepaalde talen niet wilt beschikbaar maken.'); |
|
| 43 | 43 | |
| 44 | 44 | foreach ($locales as $locale) { |
| 45 | 45 | $fields['url-slugs.' . $locale] = UrlSlugField::make('url-slugs.' . $locale) |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | public static function getByModel(Model $model) |
| 64 | 64 | { |
| 65 | 65 | return static::where('model_type', $model->getMorphClass()) |
| 66 | - ->where('model_id', $model->id) |
|
| 67 | - ->get(); |
|
| 66 | + ->where('model_id', $model->id) |
|
| 67 | + ->get(); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | public function replace(array $values): UrlRecord |
@@ -115,9 +115,9 @@ discard block |
||
| 115 | 115 | if($ignoredModel){ |
| 116 | 116 | $builder->whereNotIn('id', function($query) use($ignoredModel){ |
| 117 | 117 | $query->select('id') |
| 118 | - ->from('chief_urls') |
|
| 119 | - ->where('model_type', '=', $ignoredModel->getMorphClass()) |
|
| 120 | - ->where('model_id', '=', $ignoredModel->id); |
|
| 118 | + ->from('chief_urls') |
|
| 119 | + ->where('model_type', '=', $ignoredModel->getMorphClass()) |
|
| 120 | + ->where('model_id', '=', $ignoredModel->id); |
|
| 121 | 121 | }); |
| 122 | 122 | } |
| 123 | 123 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | public function validate(array $data) |
| 48 | 48 | { |
| 49 | 49 | foreach($this->fields as $field){ |
| 50 | - $field->validator($data)->validate(); |
|
| 50 | + $field->validator($data)->validate(); |
|
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
@@ -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'), |