Hello I am trying to export a csv file in a specific folder, I have tried several things and have no results
By doing the following code it exports me normally in the default /app/ folder
public function export(){
$super = Super::select('ano_plantacion','zona','sitio', 'manejo','sup_ha','codigo','rpend')->get();
Excel::store(new SuperExport($super), 'Super.csv'));
}
Im try with this:
Excel::store(new SuperExport($super), 'Super.csv', storage_path('/app/export'));
Error:
"Trying to access array offset on value of type null"
And this:
Excel::store(new SuperExport($super), storage_path('/app/export/Super.csv'));
Error:
Impossible to create the root directory "C:\Users\pachi\Documents\Version_web\mpe_web\storage\app\C:/Users/pachi/Documents/Version_web/mpe_web/storage/app/export
Help pls