/** * Display a Filtered Listing of the resource. */ public function filter() { $location = $this->getRequest(Location::TABLE_NAME); // using an implementation of the Location Repository Interface $locations = $this->locationRepository->paginate($location); // populate a View return View::make('pages.location.index', compact('location', 'locations')); }
/** * Move this resource */ public function move($id) { // if guest or cannot pallet.edit, redirect -> home if (Entrust::can('pallet.edit') == false) { return redirect()->route('home'); } $location = $this->getRequest(Location::TABLE_NAME); //$sessionAll = Session::all(); //dd(__METHOD__.'('.__LINE__.')',compact('id','location','sessionAll')); // using an implementation of the Pallet Repository Interface $pallet = $this->palletRepository->find($id); $locations = $this->locationRepository->paginate($location); return view('pages.pallet.edit', compact('pallet', 'location', 'locations')); }