/** * Display a listing of the resource. * * @return Response */ public function index(MenuRequest $request, $parent = 1) { $parent = $this->repository->find(hashids_encode($parent)); $rootMenu = $this->repository->rootMenues(); $this->theme->prependTitle(trans('menu.names') . ' :: '); $this->theme->asset()->container('footer')->add('nestable', 'packages/nestable/jquery.nestable.js'); return $this->theme->of('Menu::index', compact('rootMenu', 'parent'))->render(); }
/** * Encrypt upload folder. * * @param string $folder * * @return string */ function folder_encode($folder) { $arr = explode('/', $folder); $suffix = ''; if (count($arr) > 4) { $suffix = '/' . $arr[4]; unset($arr[4]); } return hashids_encode($arr) . $suffix; }
/** * Get the route key for the model. * * @return string */ public function getRouteKey() { return hashids_encode($this->getOriginal($this->getKeyName())); }
/** * Get the route key for the model. * * @return string */ public function getRouteKey() { return hashids_encode($this->getKey()); }