Hujjat / laravStart

Starter AdminLTE3 with Laravel 5.7 and Vuejs 2+
https://www.youtube.com/playlist?list=PLB4AdipoHpxaHDLIaMdtro1eXnQtl_UvE
380 stars 266 forks source link

preg_match(): Compilation failed: invalid range in character class at offset 20 #25

Open arhanjunaid opened 4 years ago

arhanjunaid commented 4 years ago

i am using laravel 5.7 and i am when ever i am refreshing the page i am getting the error

return preg_match($route->getCompiled()->getRegex(), rawurldecode($path));

preg_match(): Compilation failed: invalid range in character class at offset 20

this my ruote web.php file: <?php

Route::get('/', function () { return view('welcome'); });

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home'); Route::get('invoice', function(){ return view('invoice'); });

Route::get('{path}','HomeController@index')->where( 'path', '([A-z\d-/_.]+)?' );

nahid18 commented 4 years ago

Remove the last line and copy paste the line below:

Route::get('{path}','HomeController@index')->where( 'path', '([A-z\d\-/_.]+)?' );