I made a profile page in Laravel with something like /profile/{name} and I use a UserController@showProfile:
public function showProfile($name)
{
if(!Cache::has($name))
{
if(DB::table('users')->where('name', $name)->exists())
{
$user = DB::table('users')->where('name', $name)->get();
Cache::put($name, $user, 10);
}
else
{
return view ('error404');
}
}
return view ('user.profile', ['profile_stats' => Cache::get($name)]);
}
But nav-tabs don't work if I put /profile/{name}, if I let it just /profile everything works.
This is the nav-tab: http://imgur.com/a/C1T9N
via Andrei G.