public function edit($id) { if (Auth::check() && (Auth::user()->id == $id || Auth::user()->access == 1)) { $tutor = Tutor::firstOrCreate(['id' => $id]); $subjects = Subjects::all(); $levels = Subjects::getLevels(); $districts = Districts::all(); $subject = Input::get('sublevel'); $district = Input::get('district'); return View::make('edit_profile')->with(compact(['tutors', 'subjects', 'levels', 'districts'])); } return View::make('login'); }