/** * Get list of folders as json to populate treeview * * @return mixed */ public function getFolders() { $dir_path = parent::getPath(); $directories = parent::getDirectories($dir_path); $share_path = parent::getPath('share'); $shared_folders = parent::getDirectories($share_path); return View::make('laravel-filemanager::tree')->with('dirs', $directories)->with('shares', $shared_folders); }
/** * Get list of folders as json to populate treeview * * @return mixed */ public function getFolders() { $dir_path = $this->file_location . \Auth::user()->user_field; $directories = parent::getDirectories($dir_path); $share_path = $this->file_location . Config::get('lfm.shared_folder_name'); $shared_folders = parent::getDirectories($share_path); return View::make('laravel-filemanager::tree')->with('dirs', $directories)->with('shares', $shared_folders); }
/** * Get list of folders as json to populate treeview * * @return mixed */ public function getFolders() { $user_path = parent::getPath('user'); $lfm_user_path = parent::getFileName($user_path); $user_folders = parent::getDirectories($user_path); $share_path = parent::getPath('share'); $lfm_share_path = parent::getFileName($share_path); $shared_folders = parent::getDirectories($share_path); return view('laravel-filemanager::tree')->with('user_dir', $lfm_user_path['long'])->with('dirs', $user_folders)->with('share_dir', $lfm_share_path['long'])->with('shares', $shared_folders); }
/** * Get the images to load for a selected folder * * @return mixed */ public function getItems() { $type = Input::get('type'); $view = $this->getView(); $path = parent::getPath(); $files = File::files($path); $file_info = $this->getFileInfos($files, $type); $directories = parent::getDirectories($path); $thumb_url = parent::getUrl('thumb'); return view($view)->with(compact('type', 'file_info', 'directories', 'thumb_url')); }
/** * Get the images to load for a selected folder * * @return mixed */ public function getItems() { $type = Input::get('type'); $view = $this->getView($type); $path = $this->file_location . Input::get('working_dir'); $files = File::files(base_path($path)); $file_info = $this->getFileInfos($files, $type); $directories = parent::getDirectories($path); $thumb_url = parent::getUrl('thumb'); return View::make($view)->with(compact('files', 'file_info', 'directories', 'thumb_url')); }