Exemple #1
0
 /**
  * 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();
 }
Exemple #2
0
 /**
  * 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;
 }
Exemple #3
0
 /**
  * Get the route key for the model.
  *
  * @return string
  */
 public function getRouteKey()
 {
     return hashids_encode($this->getOriginal($this->getKeyName()));
 }
Exemple #4
0
 /**
  * Get the route key for the model.
  *
  * @return string
  */
 public function getRouteKey()
 {
     return hashids_encode($this->getKey());
 }