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