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.
Written by Amanpreet Singh
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#