update project
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers\Api\V2\Finance;
|
||||
|
||||
use App\Domain\SchoolCore\Context\SchoolContextStore;
|
||||
use App\Domain\SchoolCore\Finance\Contracts\FinanceFileServiceContract;
|
||||
use App\Http\Requests\Finance\DownloadPaymentFileRequest;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
final class PaymentFileController extends Controller
|
||||
{
|
||||
public function __construct(private readonly SchoolContextStore $context, private readonly FinanceFileServiceContract $files) {}
|
||||
|
||||
public function show(DownloadPaymentFileRequest $request, int $payment): BinaryFileResponse
|
||||
{
|
||||
return $this->files->downloadPaymentFile($this->context->current(), $payment, (string) $request->validated('mode', 'download'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user