Level 21
Could you please provide your shared_files table structure and your file storage folder structure where you are saving your uploaded files?
1 like
How can I get a user's shared files but not everything together (parents and children) only the parents like in a file explorer
it should only bring folder1, image,jpg, anotherfolder
private function getSharedWithMe($user) {
$user = Auth::user();
$files = File::join('shared_files', 'files.id', '=', 'shared_files.file_id')
->where('shared_files.user_id', $user->id)
->cursorPaginate(30);
return $files;
}
Please or to participate in this conversation.