Commit 99d9c82e authored by huy.dang's avatar huy.dang

fix route:cache issue

parent a075e380
......@@ -4,6 +4,7 @@ namespace Modules\Core\Providers;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Routing\Router;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
abstract class RoutingServiceProvider extends ServiceProvider
{
......@@ -51,7 +52,12 @@ abstract class RoutingServiceProvider extends ServiceProvider
$this->loadApiRoutes($router);
});
if (app('asgard.isInstalled')) {
$prefixes = array_merge(json_decode(setting('core::locales')), ['']);
} else {
$prefixes = [LaravelLocalization::setLocale()];
}
foreach ($prefixes as $prefix) {
$router->group([
'namespace' => $this->namespace,
......
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