dimanche 31 juillet 2016

Laravel 5 : Facing issue with defining routes with parameter

Working on Laravel 5.2 app, My problem with routes I've defined.

1. Redirect to home

Route::get('/', ['as' => '/','uses' => 'HomeController@index']);

2. Redirect to user profile i.e "http://ift.tt/2akSkng"

Route::get('/{username?}', ['as' => '/','uses' => 'HomeController@profile']);

3. Not Redirect to dashboard, its redirect to profile action

Route::get('/dashboard', ['as' => '/dashboard','uses' => 'HomeController@dashboard']);

Thanks in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire