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