get('path'); // create bucket $bucket = Bucket::find($id); // getting files $files = FileManager::find($bucket->path.'/'.$path); return response()->json([ 'files' => $files ]); } }