/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $prisoner_count = Prisoner::count();
     $visitors_count = Visitor::count();
     $bailed_count = Prisoner::bailed()->count();
     $guards_count = User::guards()->count();
     $prisoners = Prisoner::latest()->take(10)->get();
     $bailedPrisoners = Prisoner::latest()->take(10)->bailed()->get();
     return view('dashboard', compact('prisoner_count', 'prisoners', 'bailedPrisoners', 'visitors_count', 'bailed_count', 'guards_count'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $visitor = Visitor::findOrFail($id);
     $visitor->delete();
     Session::flash('success_msg', 'Visit Deleted Successfully');
     return redirect()->route('visitor.index');
 }