X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/eaa1765c7a68cd671bcb37a666203210bf05d217..refs/pull/1462/head:/app/Providers/RouteServiceProvider.php diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index dd166525a..c4c39d534 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -1,9 +1,9 @@ mapWebRoutes(); +// $this->mapApiRoutes(); + } + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @return void + */ + protected function mapWebRoutes() + { + Route::group([ + 'middleware' => 'web', + 'namespace' => $this->namespace, + ], function ($router) { + require base_path('routes/web.php'); + }); + } + /** + * Define the "api" routes for the application. + * + * These routes are typically stateless. + * + * @return void + */ + protected function mapApiRoutes() { - $router->group(['namespace' => $this->namespace], function ($router) { - require app_path('Http/routes.php'); + Route::group([ + 'middleware' => 'api', + 'namespace' => $this->namespace, + 'prefix' => 'api', + ], function ($router) { + require base_path('routes/api.php'); }); } }