I'm new to Laravel 5.4 and I need to download few PDF files from its database. There's an issue downloading the files.
Here is my controller.
public function download_files(){
$dowaloads=DB::table('dowanloadable_files')->get();
return view('dowanload.dowanload', compact('dowaloads'));
}
Here is my view.
<tbody>
@foreach($dowaloads as $download)
<tr>
<td>{{ $download->file_title }}</td>
<td><a href="download/{{ $download->file_name }}" download="{{ $download->file_name }}"> <button type="button" class="btn btn-primary">Dowanload</button></a></td>
</tr>
@endforeach
i place all these PDF files in public/download directory as well but this problem not changed. Is this due to no files in the database?