Вы должны реализовать контроллер профиля пользователя, как это
Например:
class UsersController extends Controller
{
//
public function getList($message = null){
$users = User::All();
return view("users.list",Array("users"=>$users,"message"=>$message));
}
public function editUser($id){
$user = User::findOrFail($id);
return view("users.edit", Array("user"=>$user));
}
public function updateUser($id, Request $request){
$user = User::findOrFail($id);
if($request->input("name")!=null)$user->name = $request->input("name");
if($request->input("email")!=email)$user->email = $request->input("email");
$message = array("data"=>"User modified.","type"=>"success");
try{
$user->save();
}catch(\Illuminate\Database\QueryException $ex){
$message = array("data"=>"Exception trying modify the data ".$ex, "type"=>"danger");
}
return $this->getList($message);
}
public function changePassword($id){
$user = User::findOrFail($id);
return view("users.password", Array("user"=>$user));
}
public function updatePassword($id, Request $request){
if($request->input("password") != $request->input("password_confirm"))
return redirect()->back()->withInput()->with("message",Array("type"=>"danger","data"=>"Password fields does not match!"));
$user = User::findOrFail($id);
$user->password = bcrypt($request->input("password"));
$message = array("data"=>"Password changed.","type"=>"success");
try{
$user->save();
}catch(\Illuminate\Database\QueryException $ex){
$message = array("data"=>"Exception trying modify the data ".$ex, "type"=>"danger");
}
return $this->getList($message);
}
}