Make slug route param optional for CMS module.

This allows the home page to load.
This commit is contained in:
Ben Thomson 2020-01-19 23:23:27 +08:00
parent f9d7c79de5
commit cf67e83598
No known key found for this signature in database
GPG Key ID: B2BAFACC5ED68F87
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ App::before(function ($request) {
* The CMS module intercepts all URLs that were not
* handled by the back-end modules.
*/
Route::any('{slug}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web');
Route::any('{slug?}', 'Cms\Classes\CmsController@run')->where('slug', '(.*)?')->middleware('web');
/**
* @event cms.route