/**
  * 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'));
 }
Exemple #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Ruangan $ruangan)
 {
     $ruangan->delete();
     return redirect('/ruangan');
 }