@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | private function mapHostRoutes($router, $groupOptions, $middlewares, $supportSubdomainRouting) |
71 | 71 | { |
72 | 72 | if (file_exists(base_path('routes/admin.php'))) { |
73 | - $hostRoutes = function ($router) use ($middlewares) { |
|
73 | + $hostRoutes = function($router) use ($middlewares) { |
|
74 | 74 | $router->group([ |
75 | 75 | 'namespace' => config('twill.namespace', 'App') . '\Http\Controllers\Admin', |
76 | 76 | 'middleware' => $middlewares, |
77 | - ], function ($router) { |
|
77 | + ], function($router) { |
|
78 | 78 | require base_path('routes/admin.php'); |
79 | 79 | }); |
80 | 80 | }; |
@@ -93,25 +93,25 @@ discard block |
||
93 | 93 | |
94 | 94 | private function mapInternalRoutes($router, $groupOptions, $middlewares, $supportSubdomainRouting) |
95 | 95 | { |
96 | - $internalRoutes = function ($router) use ($middlewares, $supportSubdomainRouting) { |
|
97 | - $router->group(['middleware' => $middlewares], function ($router) { |
|
96 | + $internalRoutes = function($router) use ($middlewares, $supportSubdomainRouting) { |
|
97 | + $router->group(['middleware' => $middlewares], function($router) { |
|
98 | 98 | require __DIR__ . '/../routes/admin.php'; |
99 | 99 | }); |
100 | 100 | |
101 | 101 | $router->group([ |
102 | 102 | 'middleware' => $supportSubdomainRouting ? ['supportSubdomainRouting'] : [], |
103 | - ], function ($router) { |
|
103 | + ], function($router) { |
|
104 | 104 | require __DIR__ . '/../routes/auth.php'; |
105 | 105 | }); |
106 | 106 | |
107 | - $router->group(['middleware' => $this->app->environment('production') ? ['twill_auth:twill_users'] : []], function ($router) { |
|
107 | + $router->group(['middleware' => $this->app->environment('production') ? ['twill_auth:twill_users'] : []], function($router) { |
|
108 | 108 | require __DIR__ . '/../routes/templates.php'; |
109 | 109 | }); |
110 | 110 | }; |
111 | 111 | |
112 | 112 | $router->group($groupOptions + [ |
113 | 113 | 'namespace' => $this->namespace . '\Admin', |
114 | - ], function ($router) use ($internalRoutes, $supportSubdomainRouting) { |
|
114 | + ], function($router) use ($internalRoutes, $supportSubdomainRouting) { |
|
115 | 115 | $router->group([ |
116 | 116 | 'domain' => config('twill.admin_app_url'), |
117 | 117 | ], $internalRoutes); |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | 'domain' => config('app.url'), |
130 | 130 | 'middleware' => [config('twill.admin_middleware_group', 'web')], |
131 | 131 | ], |
132 | - function ($router) { |
|
133 | - $router->group(['middleware' => $this->app->environment('production') ? ['twill_auth:twill_users'] : []], function ($router) { |
|
132 | + function($router) { |
|
133 | + $router->group(['middleware' => $this->app->environment('production') ? ['twill_auth:twill_users'] : []], function($router) { |
|
134 | 134 | require __DIR__ . '/../routes/templates.php'; |
135 | 135 | }); |
136 | 136 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | protected function registerMacros() |
167 | 167 | { |
168 | - Route::macro('moduleShowWithPreview', function ($moduleName, $routePrefix = null, $controllerName = null) { |
|
168 | + Route::macro('moduleShowWithPreview', function($moduleName, $routePrefix = null, $controllerName = null) { |
|
169 | 169 | if ($routePrefix === null) { |
170 | 170 | $routePrefix = $moduleName; |
171 | 171 | } |
@@ -181,12 +181,12 @@ discard block |
||
181 | 181 | Route::name($moduleName . '.preview')->get('/admin-preview' . $routePrefix . '{slug}', $controllerName . 'Controller@show')->middleware(['web', 'twill_auth:twill_users', 'can:list']); |
182 | 182 | }); |
183 | 183 | |
184 | - Route::macro('module', function ($slug, $options = [], $resource_options = [], $resource = true) { |
|
184 | + Route::macro('module', function($slug, $options = [], $resource_options = [], $resource = true) { |
|
185 | 185 | |
186 | 186 | $slugs = explode('.', $slug); |
187 | 187 | $prefixSlug = str_replace('.', "/", $slug); |
188 | 188 | $_slug = Arr::last($slugs); |
189 | - $className = implode("", array_map(function ($s) { |
|
189 | + $className = implode("", array_map(function($s) { |
|
190 | 190 | return ucfirst(Str::singular($s)); |
191 | 191 | }, $slugs)); |
192 | 192 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | } |
258 | 258 | |
259 | 259 | if ($resource) { |
260 | - Route::group(['as' => $resourceCustomGroupPrefix], function () use ($slug, $className, $resource_options) { |
|
260 | + Route::group(['as' => $resourceCustomGroupPrefix], function() use ($slug, $className, $resource_options) { |
|
261 | 261 | Route::resource($slug, "{$className}Controller", $resource_options); |
262 | 262 | }); |
263 | 263 | } |