public function test() { // $path = 'id/ff'; // $parent = (object) array( // 'pname' => array(), // 'ppath' => array() // ); // $parent->pname = explode("/", $path); // var_dump($parent); // $temp = '/'; // for($i = 0; $i < count($parent->pname); $i++){ // if( $i == 0){ // $temp = $temp . $parent->pname[$i]; // $parent->ppath[] = $temp; // echo $parent->pname[$i] . " --- " . $parent->ppath[$i] . "<br>"; // $temp = '/'; // }else{ // $temp = $temp . $parent->pname[$i]; // $parent->ppath[] = $temp; // echo $parent->pname[$i] . " --- " . $parent->ppath[$i] . "<br>"; // $temp = $temp . '/'; // } // } $data = json_decode(Cache::where('user_id', 1)->get()->find(2)->data, true); // dd($data); $ob = new FileMapping($data); var_dump($ob->traverseInsideFolder($data, "/Test/aaa/in_aaa/new_folder")); }
public static function get($keyCache) { return Cache::where(array('identifier' => $keyCache))->pluck('data'); }