@@ -60,7 +60,7 @@ |
||
60 | 60 | * Get the response for a successful password reset. |
61 | 61 | * |
62 | 62 | * @param string $response |
63 | - * @return \Illuminate\Http\Response |
|
63 | + * @return \Illuminate\Http\RedirectResponse |
|
64 | 64 | */ |
65 | 65 | protected function sendResetResponse($response) |
66 | 66 | { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public static function findByNameOrCreate(string $name, TagType $type): Tag |
33 | 33 | { |
34 | 34 | $existing = self::nonDraft()->get() |
35 | - ->first(function (Tag $tag, int $id) use ($name, $type) { |
|
35 | + ->first(function(Tag $tag, int $id) use ($name, $type) { |
|
36 | 36 | return $tag->translate('name', content_locale()) === $name && $tag->type === (string) $type; |
37 | 37 | }); |
38 | 38 |
@@ -20,9 +20,9 @@ |
||
20 | 20 | |
21 | 21 | public function renderMetaTags(): string |
22 | 22 | { |
23 | - return $this->seo()->filter(function ($value, $key) { |
|
23 | + return $this->seo()->filter(function($value, $key) { |
|
24 | 24 | return starts_with($key, 'meta_'); |
25 | - })->map(function ($value, $key) : string { |
|
25 | + })->map(function($value, $key) : string { |
|
26 | 26 | $key = substr($key, 5); |
27 | 27 | $attribute = starts_with($key, 'og:') ? 'property' : 'name'; |
28 | 28 | return "<meta {$attribute}=\"{$key}\" content=\"{$value}\">"; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | 'module' => $this->moduleName, |
37 | 37 | 'parentMenuItems' => app(ArticleRepository::class) |
38 | 38 | ->getTopLevel() |
39 | - ->filter(function (Article $article) { |
|
39 | + ->filter(function(Article $article) { |
|
40 | 40 | return $article->technical_name != SpecialArticle::HOME; |
41 | 41 | }) |
42 | 42 | ->pluck('name', 'id') |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /* |
20 | 20 | * Authenticate the user's personal channel... |
21 | 21 | */ |
22 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
22 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
23 | 23 | return (int) $user->id === (int) $userId; |
24 | 24 | }); |
25 | 25 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * Get the response for a successful password reset. |
61 | 61 | * |
62 | 62 | * @param string $response |
63 | - * @return \Illuminate\Http\Response |
|
63 | + * @return \Illuminate\Http\RedirectResponse |
|
64 | 64 | */ |
65 | 65 | protected function sendResetResponse($response) |
66 | 66 | { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * Get the response for a successful password reset. |
61 | 61 | * |
62 | 62 | * @param string $response |
63 | - * @return \Illuminate\Http\Response |
|
63 | + * @return \Illuminate\Http\RedirectResponse |
|
64 | 64 | */ |
65 | 65 | protected function sendResetResponse($response) |
66 | 66 | { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * Get the response for a successful password reset. |
61 | 61 | * |
62 | 62 | * @param string $response |
63 | - * @return \Illuminate\Http\Response |
|
63 | + * @return \Illuminate\Http\RedirectResponse |
|
64 | 64 | */ |
65 | 65 | protected function sendResetResponse($response) |
66 | 66 | { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | protected function registerMacros(Router $router) |
27 | 27 | { |
28 | - $router->macro('module', function ($slug, $className, $sortable = false) use ($router) { |
|
28 | + $router->macro('module', function($slug, $className, $sortable = false) use ($router) { |
|
29 | 29 | if ($sortable) { |
30 | 30 | $router->patch("{$slug}/changeOrder", "{$className}Controller@changeOrder"); |
31 | 31 | } |
@@ -33,15 +33,15 @@ discard block |
||
33 | 33 | $router->resource($slug, "{$className}Controller"); |
34 | 34 | }); |
35 | 35 | |
36 | - $router->macro('articleList', function ($technicalNamePrefix, $action) use ($router) { |
|
36 | + $router->macro('articleList', function($technicalNamePrefix, $action) use ($router) { |
|
37 | 37 | |
38 | 38 | $articles = Article::getWithTechnicalNameLike($technicalNamePrefix); |
39 | 39 | |
40 | - $router->get(app()->getLocale().'/'.fragment_slug("navigation.{$technicalNamePrefix}"), function () use ($articles) { |
|
40 | + $router->get(app()->getLocale().'/'.fragment_slug("navigation.{$technicalNamePrefix}"), function() use ($articles) { |
|
41 | 41 | return redirect(route("{$articles->first()->technical_name}")); |
42 | 42 | })->name($technicalNamePrefix); |
43 | 43 | |
44 | - $articles->map(function ($article) use ($technicalNamePrefix, $action, $router) { |
|
44 | + $articles->map(function($article) use ($technicalNamePrefix, $action, $router) { |
|
45 | 45 | $router->get(app()->getLocale().'/'.fragment_slug("navigation.{$technicalNamePrefix}").'/'.$article->url, $action)->name("{$article->technical_name}"); |
46 | 46 | }); |
47 | 47 | }); |
@@ -51,16 +51,16 @@ discard block |
||
51 | 51 | |
52 | 52 | public function map(Router $router) |
53 | 53 | { |
54 | - Route::group(['namespace' => $this->namespace], function () { |
|
54 | + Route::group(['namespace' => $this->namespace], function() { |
|
55 | 55 | |
56 | 56 | /* |
57 | 57 | * Special routes |
58 | 58 | */ |
59 | - Route::group(['middleware' => 'web'], function () { |
|
59 | + Route::group(['middleware' => 'web'], function() { |
|
60 | 60 | |
61 | 61 | Route::demoAccess('/demo'); |
62 | 62 | |
63 | - Route::get('coming-soon', function () { |
|
63 | + Route::get('coming-soon', function() { |
|
64 | 64 | return view('temp/index'); |
65 | 65 | }); |
66 | 66 | }); |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | /* |
69 | 69 | * Back site |
70 | 70 | */ |
71 | - Route::group(['namespace' => 'Back', 'middleware' => 'web', 'prefix' => 'blender'], function () { |
|
71 | + Route::group(['namespace' => 'Back', 'middleware' => 'web', 'prefix' => 'blender'], function() { |
|
72 | 72 | Auth::routes(); |
73 | 73 | |
74 | - Route::group(['middleware' => 'auth'], function () { |
|
74 | + Route::group(['middleware' => 'auth'], function() { |
|
75 | 75 | require base_path('routes/back.php'); |
76 | 76 | }); |
77 | 77 | }); |
@@ -80,16 +80,16 @@ discard block |
||
80 | 80 | * Frontsite |
81 | 81 | */ |
82 | 82 | |
83 | - Route::group(['namespace' => 'Front'], function () { |
|
84 | - Route::group(['namespace' => 'Api', 'middleware' => 'api', 'prefix' => 'api'], function () { |
|
83 | + Route::group(['namespace' => 'Front'], function() { |
|
84 | + Route::group(['namespace' => 'Api', 'middleware' => 'api', 'prefix' => 'api'], function() { |
|
85 | 85 | require base_path('routes/frontApi.php'); |
86 | 86 | }); |
87 | 87 | |
88 | - Route::group(['middleware' => ['demoMode', 'rememberLocale', 'web']], function () { |
|
88 | + Route::group(['middleware' => ['demoMode', 'rememberLocale', 'web']], function() { |
|
89 | 89 | |
90 | 90 | $multiLingual = count(config('app.locales')) > 1; |
91 | 91 | |
92 | - Route::group($multiLingual ? ['prefix' => locale()] : [], function () { |
|
92 | + Route::group($multiLingual ? ['prefix' => locale()] : [], function() { |
|
93 | 93 | try { |
94 | 94 | Auth::routes(); |
95 | 95 | require base_path('routes/front.php'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | }); |
100 | 100 | |
101 | 101 | if ($multiLingual) { |
102 | - Route::get('/', function () { |
|
102 | + Route::get('/', function() { |
|
103 | 103 | return redirect(locale()); |
104 | 104 | }); |
105 | 105 | } |