All you have is an ID to show a profile? You could pass a var to the view or just check for the URI ID?
Nov 21, 2014
12
Level 6
how to check if route is users/$id
Hello, I have menu where i need to show a menu item active. if we are currently displaying user profile
so i have
Route::get('{userId?}', array('as' => 'users.show', 'uses' => 'UsersController@show'));
how can i write an if condition to check whether i am on user profile or not,
Any help is appreciated
Level 13
That won't work with the is_route() function.
You can use the * wild card with Request::is() so something like:
Request::is('user/*')
Please or to participate in this conversation.