mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-24 02:20:05 +08:00
Fix route address error for JSON
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user