Files
Antonio Lopes dos Santos afec302c3e
All checks were successful
build-api-image / build (push) Successful in 51s
init commit
2026-08-04 16:52:02 -03:00

25 lines
689 B
PHP

<?php
namespace App\Http\Controllers\Impressao\Ambulatorio;
use App\Http\Controllers\Controller;
use App\Models\Ambulatorio\Atendimento;
use App\Services\Ambulatorio\AtendimentoEnfermagem\PreAtendimentoService;
use App\Utils\Exports\Pdf1;
class PreAtendimentoController extends Controller
{
private const TITLE = 'PRÉ-ATENDIMENTO';
private const TEMPLATE = 'ambulatorio.pre-atendimento';
public function __invoke($atendimentoId)
{
$atendimento = Atendimento::findOrFail($atendimentoId);
$data = PreAtendimentoService::getPrintData($atendimento->preAtendimento->id);
return Pdf1::generate(self::TITLE, self::TEMPLATE, $data);
}
}