How to create a slug route excluding some slug in laravel routing?
Laravel is a most common framework. it is very easy to use and learn.if you want to use route in laravel like slug and you want to match that slug for specific string then you should use below code.
Use below Code :
$router->get('/{slug}','YourController@action_name') ->where('slug', '([a-zA-Z0-9-]+)') ->name('demo-page');
Share