I am using the resourceful routing for a laravel 4 application. Here is my code on the routes.php file
Route::resource('/users', 'UserController');
When i navigate to public/users/1 it works as expected, it shows the record with id = 1. Now what i noticed is when i navigate to public/users/1-xxxxxxx or any text after the id, it shows the record with id=1. My first question is, is this supposed to happen?
2nd question is, how would i create a url just like stackoverflow, where for example the username is included on the url after the id where the separator between them is a slash.
something like public/users/1/john.