Reverting commit a86e2688 in routing SP.

This fixes #581
parent b4b952dc
......@@ -52,31 +52,15 @@ abstract class RoutingServiceProvider extends ServiceProvider
$this->loadApiRoutes($router);
});
$prefixes = $this->getPrefixes();
foreach ($prefixes as $prefix) {
$router->group([
'namespace' => $this->namespace,
'prefix' => $prefix,
'prefix' => LaravelLocalization::setLocale(),
'middleware' => ['localizationRedirect', 'web'],
], function (Router $router) {
$this->loadBackendRoutes($router);
$this->loadFrontendRoutes($router);
});
}
}
/**
* Get locale prefixes
* @return array
*/
private function getPrefixes()
{
if (app('asgard.isInstalled')) {
return array_merge(json_decode(setting('core::locales')), ['']);
}
return [LaravelLocalization::setLocale()];
}
/**
* @param Router $router
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment