public function update(Request $request, Teacher $teacher) { $input = $request->all(); $teacher->fill($input)->save(); return back()->with('message', 'Record Successfully Updated!'); }