forked from TFMM/silent-auction
feat: add automatic item pickup slip printing via HP ePrint
This commit is contained in:
@@ -9,4 +9,14 @@ use Filament\Resources\Pages\CreateRecord;
|
||||
class CreateCheckout extends CreateRecord
|
||||
{
|
||||
protected static string $resource = CheckoutResource::class;
|
||||
|
||||
protected function afterCreate(): void
|
||||
{
|
||||
try {
|
||||
$printerService = app(\App\Services\PrinterService::class);
|
||||
$printerService->printForCheckout($this->record);
|
||||
} catch (\Exception $e) {
|
||||
\Illuminate\Support\Facades\Log::error('Auto-print failed from Filament: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user