0

Hello I would like to send a message with the download function from laravel.

What I'm currently using:

return response()->download($pathToFile, $fileName);

What I tried:

return response()->download($pathToFile, $fileName)->with('success','Download started!');

It doesn't work.

In my view:

@if(Session::has('message'))
            <p class="alert alert-success">{{ Session::get('message') }}</p>
        @endif
Lars Flieger
  • 2,421
  • 1
  • 12
  • 34

0 Answers0