I have following url in laravel:
1.Need to change From:
localhost/laravel/page/2/
to
localhost/laravel/2/
My Route.php is
Route::get('page/{id}/',
array(
'as' => 'page', 'uses' =>'Frontcontroller@page'));
But When I change to this,
Route::get('/{id}/',
array(
'as' => 'page', 'uses' =>'Frontcontroller@page'));
I have noticed that it has conflict issues with other route ,Plz help me
Thanx in advance
Just declare the new routes at the last of your all other routes and also add a where clause, for example, try something like this:
Optionally you may add a
where
clause like this: