Gutschriften

This commit is contained in:
Kevin Adametz 2021-04-23 14:52:25 +02:00
parent 35ae3da244
commit 6ac9fcc4d2
20 changed files with 510 additions and 63 deletions

View file

@ -2,9 +2,10 @@
namespace App\Http\Controllers;
use App\Services\Invoice;
use Response;
use Storage;
use Response;
use App\Services\Credit;
use App\Services\Invoice;
class FileController extends Controller
{
@ -63,8 +64,8 @@ class FileController extends Controller
if ($disk === 'credit'){
$UserCredit = \App\Models\UserCredit::findOrFail($id);
$filename = Invoice::getCreditFilename($UserCredit);
$path = Invoice::getCreditDownloadPath($UserCredit);
$filename = Credit::getFilename($UserCredit);
$path = Credit::getDownloadPath($UserCredit);
if (!Storage::disk('public')->exists($path)) {
return Response::make('File no found.', 404);
}