/**
  * Remove the specified Location from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $location = $this->locationRepository->findWithoutFail($id);
     if (empty($location)) {
         Flash::error('Location not found');
         return redirect(route('locations.index'));
     }
     $this->locationRepository->delete($id);
     Flash::success('Location deleted successfully.');
     return redirect(route('locations.index'));
 }
 /**
  * Display a listing of the Location.
  *
  * @param Request $request
  * @return Response
  */
 public function index(Request $request)
 {
     $this->locationRepository->pushCriteria(new RequestCriteria($request));
     $locations = $this->locationRepository->paginate(25);
     return view('inserter.locations.index')->with('locations', $locations);
 }