init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Http\Controllers\Impressao\Ambulatorio;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Storage;
class ImpressaoAssinadoController extends Controller
{
public function __invoke($atendimentoId)
{
$path = 'assinatura-eletronica' . DIRECTORY_SEPARATOR . app('config')->get('database.default') . DIRECTORY_SEPARATOR . 'ambulatorio' . DIRECTORY_SEPARATOR . 'atendimento';
$fileName = request()->tipo;
$arquivo = "{$fileName}-{$atendimentoId}.PDF";
$headers = [
'Content-Type' => 'application/pdf',
];
$filePath = Storage::path( $path . DIRECTORY_SEPARATOR . $arquivo);
return response()->download($filePath, $arquivo, $headers);
}
}