listing files in backend
This commit is contained in:
parent
4ac1c34b6a
commit
ccff83fa66
9 changed files with 153 additions and 93 deletions
18
app/Http/Controllers/Settings/FileController.php
Normal file
18
app/Http/Controllers/Settings/FileController.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\File;
|
||||
|
||||
class FileController extends Controller
|
||||
{
|
||||
public function download($id)
|
||||
{
|
||||
//$report = $this->report->find($id);
|
||||
$file = File::findOrFail($id);
|
||||
$file_path = public_path('storage/' . $file->path_name);
|
||||
return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]);
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue