mercredi 15 avril 2020

How to store file into network shared folder using laravel 5.8

I want to store excel file to a network shared folder using laravel 5.8. I have read laravel documentation for using filesystem to do this. I have do symbolic link using mklink to directory C:\Users\Administrator\Documents\Generate. And I have setting permission read and write for the Generate folder.

This is my filesystem :

'trading' => [
    'driver' => 'local',
    'root'   => 'C:\Users\Administrator\Documents\Generate\tradingid',
],

This is my function :

 public function ($id){
   $data = Excel::store(new ExportData($id), 'ExcelData.xlsx', 'trading');

   if($data){
    echo 'success';
   }else{
    echo 'error';
   }
}

For store the excel file i'm using library Maatwebsite.

When function executed, i got error response like this "The root path C:\\Users\\Administrator\\Documents\\Generate\\tradingid is not readable.".

enter image description here

How to fix this issue?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire