1// using User->username instead of id on url:
2public function show($user)
3 {
4 // where<YourAtributeName>($param)->firstOrFail()
5 $user = User::whereUsername($user)->firstOrFail();
6 return view('users.show', ['user'=>$user]);
7 }