Last Updated: February 25, 2016
·
1.122K
· apsdehal

Laravel 4: Routes and Controllers

Always place your Routes with parameters above the RESTful ones otherwise it will override the same.<br/>
Like this:

Route::get('/{url}', 'UrlController@handle' );</code></p> Route::controller('/','IndexController');</code></p> If you do it like this: Route::controller('/','IndexController');</code></p> Route::get('/{url}', 'UrlController@handle' );</code></p> This will run the get action within the restful controller and not the parameter one.