forked from TFMM/silent-auction
23 lines
643 B
PHP
23 lines
643 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\CheckoutResource\Pages;
|
|
|
|
use App\Filament\Resources\CheckoutResource;
|
|
use Filament\Actions;
|
|
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());
|
|
}
|
|
}
|
|
}
|