@@ -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 | |
@@ -36,7 +36,4 @@ |
||
| 36 | 36 | |
| 37 | 37 | private function getMedia(HasAsset $model, $locale = null) |
| 38 | 38 | { |
| 39 | - return $model->assets($this->key(), $locale)->all(); |
|
| 40 | - } |
|
| 41 | ->>>>>>> 0b857885b773fe2d5321aefa1f512733906e1067 |
|
| 42 | -} |
|
| 39 | + return $model->assets($this->key(), $locale |
|
| 43 | 40 | \ No newline at end of file |
@@ -28,6 +28,4 @@ |
||
| 28 | 28 | |
| 29 | 29 | >>>>>>> 0b857885b773fe2d5321aefa1f512733906e1067 |
| 30 | 30 | /** @var UploadMedia */ |
| 31 | - app(UploadMedia::class)->fromUploadComponent($this->model, $files, $filesOrder); |
|
| 32 | - } |
|
| 33 | -} |
|
| 31 | + app(UploadMedia::class)->fromUploadComponent($this->model, $files, $filesOrder |
|
| 34 | 32 | \ No newline at end of file |