danny620's avatar

Route Profile Page

I Have a route that finds a user's profile for example (example.com/northplanet) it works fine but the routes below it are ignored how do a fix this for example this doestn work Route::get('password/forgot', 'Auth\PasswordController@getEmail'); Route::get('/{url}', ['uses' => 'Frontend\ProvidersController@profile']);

0 likes
3 replies
rickbolton's avatar

I'd perhaps change your profile route to

Route::get('/{name}', ['uses' => 'Frontend\ProvidersController@profile']);

I've tested this and appears to work fine

Jaytee's avatar

Since you have the {url} wildcard, on your profile method, you need to accept a parameter with the same name (ex: $url). I'd suggest changing this name so you don't get confused.

If that's still the case, try moving the routes that are being 'ignored' above the route(s) that is working.

spekkionu's avatar

The route Route::get('/{url}', ['uses' => 'Frontend\ProvidersController@profile']); will match anything without a slash so it will need to be the last route in your routes file.

Please or to participate in this conversation.