@@ -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 replaceAndRedirect(array $values): UrlRecord |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | if($ignoredModel){ |
| 118 | 118 | $builder->whereNotIn('id', function($query) use($ignoredModel){ |
| 119 | 119 | $query->select('id') |
| 120 | - ->from('chief_urls') |
|
| 121 | - ->where('model_type', '=', $ignoredModel->getMorphClass()) |
|
| 122 | - ->where('model_id', '=', $ignoredModel->id); |
|
| 120 | + ->from('chief_urls') |
|
| 121 | + ->where('model_type', '=', $ignoredModel->getMorphClass()) |
|
| 122 | + ->where('model_id', '=', $ignoredModel->id); |
|
| 123 | 123 | }); |
| 124 | 124 | } |
| 125 | 125 | |