0👍
✅
For php version is 7.3 and above use \-
instead of -
, so your final code :
Route::get('{path}',"HomeController@index")->where( 'path', '([A\-z\d\-\/_.]+)?' );
Route::get('{path}',"HomeController@index")->where('path','[\-a\-z0\-9_\s]+');
Source:stackexchange.com