I am using Laravel 5.4
Route Service Provider code is below
Route::prefix('api/v1')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/Login.php'));
Route::prefix('api/v1')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/Register.php'));
Is there any way to write both route files under the same group?
Something like this...
Route::prefix('api/v1')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/Login.php'))
->group(base_path('routes/Register.php'));
In 5.3. we could write like this...
Route::group([
'middleware' => 'auth:api',
'namespace' => $this->namespace,
'prefix' => 'api/v1',
], function ($router) {
require base_path('routes/API/Driver/Driver.php');
require base_path('routes/API/Vehicle/Vehicle.php');
});