/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $ruangans = Ruangan::all(); $i = 1; return view('ruangan.index', compact('ruangans', 'i')); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy(Ruangan $ruangan) { $ruangan->delete(); return redirect('/ruangan'); }