Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/scribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
// Whether to automatically create a docs route for you to view your generated docs. You can still set up routing manually.
'add_routes' => true,

// Domain to use for the docs endpoint for example: https://docs.yourdomain.com/.
'domain' => env('SCRIBE_DOCS_DOMAIN', null),

// URL path to use for the docs endpoint (if `add_routes` is true).
// By default, `/docs` opens the HTML page, `/docs.postman` opens the Postman collection, and `/docs.openapi` the OpenAPI spec.
'docs_url' => '/docs',
Expand Down
4 changes: 3 additions & 1 deletion routes/laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Storage;

$domain = config('scribe.laravel.domain', null);
$prefix = config('scribe.laravel.docs_url', '/docs');
$middleware = config('scribe.laravel.middleware', []);

Route::middleware($middleware)
Route::domain($domain)
->middleware($middleware)
->group(function () use ($prefix) {
Route::view($prefix, 'scribe.index')->name('scribe');

Expand Down
Loading