|
@@ -5,10 +5,9 @@ use Illuminate\Support\Facades\Route;
|
|
|
$prefix = config('apidoc.laravel.docs_url', '/doc');
|
|
|
$middleware = config('apidoc.laravel.middleware', []);
|
|
|
|
|
|
-Route::prefix($prefix)
|
|
|
- ->namespace('\Mpociot\ApiDoc\Http')
|
|
|
+Route::namespace('\Mpociot\ApiDoc\Http')
|
|
|
->middleware($middleware)
|
|
|
- ->group(function () {
|
|
|
- Route::get('/', 'Controller@html')->name('apidoc');
|
|
|
- Route::get('.json', 'Controller@json')->name('apidoc.json');
|
|
|
+ ->group(function () use ($prefix) {
|
|
|
+ Route::get($prefix, 'Controller@html')->name('apidoc');
|
|
|
+ Route::get("$prefix.json", 'Controller@json')->name('apidoc.json');
|
|
|
});
|