The slash is always missing:
Route::get('login', 'HomeController@showLogin');
must be:
Route::get('/login', 'HomeController@showLogin');
Any wildcard routes (so in your example {username} and {title} must come after all other routes.
What is happening is that it is reaching the route for {username} and matching everything - e.g /login will use HomeController@showDashboard with a variable of username => login as it has matched it on a wildcard
AlexCutts said:
Any wildcard routes (so in your example {username} and {title} must come after all other routes.
What is happening is that it is reaching the route for {username} and matching everything - e.g /login will use HomeController@showDashboard with a variable of username => login as it has matched it on a wildcard
that's right
Cheers guys, putting the wildcard routes at the end works a treat. Appreciate the help :)
Will
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community