|
@@ -39,11 +39,11 @@ discard block |
|
|
block discarded – undo |
|
39
|
39
|
return static::createRedirect($model->url($locale)); |
|
40
|
40
|
} |
|
41
|
41
|
|
|
42
|
|
- if (method_exists($model, 'isPublished') && ! $model->isPublished()) { |
|
|
42
|
+ if (method_exists($model, 'isPublished') && !$model->isPublished()) { |
|
43
|
43
|
|
|
44
|
44
|
/** When admin is logged in and this request is in preview mode, we allow the view */ |
|
45
|
|
- if (! PreviewMode::fromRequest()->check()) { |
|
46
|
|
- throw new NotFoundHttpException('Model found for request ['. $slug .'] but it is not published.'); |
|
|
45
|
+ if (!PreviewMode::fromRequest()->check()) { |
|
|
46
|
+ throw new NotFoundHttpException('Model found for request ['.$slug.'] but it is not published.'); |
|
47
|
47
|
} |
|
48
|
48
|
} |
|
49
|
49
|
|
|
@@ -54,7 +54,7 @@ discard block |
|
|
block discarded – undo |
|
54
|
54
|
} |
|
55
|
55
|
} |
|
56
|
56
|
|
|
57
|
|
- throw new NotFoundHttpException('No url or model found for request ['. $slug .'] for locale ['.$locale.'].'); |
|
|
57
|
+ throw new NotFoundHttpException('No url or model found for request ['.$slug.'] for locale ['.$locale.'].'); |
|
58
|
58
|
} |
|
59
|
59
|
|
|
60
|
60
|
private static function createRedirect(string $url) |
Please login to merge, or discard this patch.