mercredi 12 août 2020

Laravel View Downloadable Link Not Working On Live

in laravel storage, i have added a CSV file, and I have added a downloadable link on view, on my local it works perfectly, but on my live server it says "does not exist"

This is my code

Controller code

public function download(Request $request)
    {
        return response()->download(storage_path("app/public/sample_csv_ffq_user_accounts.csv"));
        // return Storage::download('sample_csv_ffq_user_accounts.csv');
        // $destinationPath = storage_path('app/public/excel/sample_csv_ffq_user_accounts.csv');
        // return response()->download($destinationPath);
    }

View code

<div class="col-md-4">
        <p style="font-size:15px">Download sample template <a href="">here</a></p>
    </div>

Thank you



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire