/** * Show the form for editing the specified resource. * * @param int $id * * @return Response */ public function edit($id) { $class = SchoolClass::findOrFail($id); $terms = ClassTerm::orderBy('term')->lists('term', 'id'); return view('class.edit', compact('terms', 'class')); }
/** * Remove the specified resource from storage. * * @param int $id * * @return Response */ public function destroy($id) { ClassTerm::destroy($id); return redirect(action('ClassTermController@index')); }