Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kenphanith's avatar

How to get a list of files inside a zip file ?

Dear great developers, I am new to laravel here, and basically I want to list all the files inside a zip file stored in /storage/app/public/uploads/****.zip. I created a function in my controller

public function files (Request $request) {
     // there is a zip filename in the $request
     $zip = '/storage/app/public/uploads/****.zip';

     // from here I want to get an array of files inside the zip file

     return <array_of_files>
}

Please guide me! 🙏

0 likes
3 replies

Please or to participate in this conversation.