Commit ef1ef753 authored by Joseph Silber's avatar Joseph Silber

Use fluent routes

parent 99bb0750
......@@ -51,10 +51,9 @@ class RouteServiceProvider extends ServiceProvider
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
Route::middleware('web')
->namespace($this->namespace)
->group(function ($router) {
require base_path('routes/web.php');
});
}
......@@ -68,11 +67,10 @@ class RouteServiceProvider extends ServiceProvider
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(function ($router) {
require base_path('routes/api.php');
});
}
......
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