name('fo.') ->group(function () { // * Dev route only if (app()->environment() === 'local') { Route::view('/bs-demo', 'fo.pages.bs-demo')->name('bs-demo'); } // * Schema File Route::get('schemas/{schema}', function (string $schema) { $schemaContent = ToolboxHelper::getJsonSchema($schema); if ($schemaContent === false) { abort(404); } return response()->json($schemaContent, 200, [ 'Content-Type' => 'application/schema+json' ]); })->middleware('throttle:30,1')->where('schema', '[a-z]{1,}\.schema\.json')->name('schema'); Route::redirect('/', '/bo')->name('homepage'); });