/** * Show the application change profile form. * * @return \Illuminate\Http\Response */ public function getProfile(CityRepository $cityRepository) { if (!Auth::check() || !($user = Auth::user())) { // Auth::user() returns an instance of the authenticated user... return redirect("/"); } return view('auth.profile', ["user" => $user, "cities" => $cityRepository->all()]); }
/** * Show the form for creating a new resource. * * @param App\Repositories\CityRepository $cityRepository * @return Response */ public function create(CityRepository $cityRepository) { $cities = $cityRepository->getAllSelect(); return view($this->base . '.create', compact('cities')); }