As a part of my web application I want to upload file.
I want to protect his files with a Password.
What I want to do is to take the uploaded file, zip it, and give the .zip file a password.
I know How to upload a file in laravel but I don't know how to zip it and set password.
I'm using the below code to upload file.
$mobimg=$request->file('img');
$newfile2 = rand(456,987).time().$mobimg->getClientOriginalName();
$mobimg->move('images/upload', $newfile2);
$data=array(
'img' => $newfile2,
);
DB::table('file_upload')->insert($data);
I hope someone will help me do this
Thanks in advance.