lundi 19 octobre 2020

Export excel to specific path (Laravel5.8)

I already found the question that other asked .But, I didn't found any solution for file downloading to specific Path. Please Help me. This is the error that I'm facing
Error image

This is my Controller.blade.php

public function export() 
{
  
    $date=date('Ymd');
    $file='File_'.  $date.'_PCLists.xlsx';
    return Excel::store(new PcListsExport, $file,'real_public', \Maatwebsite\Excel\Excel::XLSX );
}

This is filesystem.php

  'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
    ],

    'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
    ],
    'real_public' => [
        'driver' => 'local',
        'root' => 'D:/DownloadFile/',
        'url' => env('APP_URL'),
        'visibility' => 'public',
    ],

    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET'),
        'url' => env('AWS_URL'),
    ],

],


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire