Updated Route Service Provider that was mismatching API and ADMIN Section (#845)

This commit is contained in:
Yash Govekar 2020-09-29 22:39:00 +05:30 committed by GitHub
parent 2c539d349d
commit b6603bd178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ class RouteServiceProvider extends ServiceProvider
]; ];
Route::group($config, function() { Route::group($config, function() {
$this->loadRoutesFrom(__DIR__.'/../Http/Routes/web.php'); $this->loadRoutesFrom(__DIR__.'/../Http/Routes/admin.php');
}); });
} }
@ -82,8 +82,8 @@ class RouteServiceProvider extends ServiceProvider
protected function registerApiRoutes(): void protected function registerApiRoutes(): void
{ {
$config = [ $config = [
'as' => 'admin.$LOWER_NAME$.', 'as' => 'api.$LOWER_NAME$.',
'prefix' => 'admin/$LOWER_NAME$', 'prefix' => 'api/$LOWER_NAME$',
'namespace' => $this->namespace.'\Api', 'namespace' => $this->namespace.'\Api',
'middleware' => ['api'], 'middleware' => ['api'],
]; ];