'unauthorized', function() { return response('Unauthorized Access', 401); }]); Route::group(['prefix' => 'swagger-doc'], function () { Route::get('/', ['as' => 'swagger.app', 'uses' => 'SwaggerController@index']); });