I am using laravel. for authentication sentry 2. When the user is visiting at my site they are going to the page
http://dolovers.com/profile/13
Here 13 is the user id.
I am researching to have a better procedure to find user by its username
and also I want to reduce the link by:
http://dolovers.com/<username>
how should I start with sentry2 and laravel. Thanks for the help :) route for profile :
# Profile
// Route::get('profile', array('as' => 'profile', 'uses' => 'Controllers\Account\ProfileController@getIndex'));
Route::get('profile', array('as' => 'profile', 'uses' => 'ProfilesController@index'));
Route::post('profile', 'Controllers\Account\ProfileController@postIndex');
This is how you find your user by id:
Or login
To reduce your link, you need to edit your route:
It should let you use route like
And also let you create urls using
I also define a second route (home) to point to
Your UsersController would look like: