/** * Display the specified resource. * * @param string $name * @return Response */ public function show($name) { $user = User::where('name', $name)->firstOrFail(); //dd($user); return view('profile')->with('name', $user->name)->with('user', $user); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ protected function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }