class PrintLoanReceiptJob implements ShouldQueue (View source)

Job to print the loan receipt asynchronously.

This job decouples the printing process from the main controller flow to avoid slowing down API responses.

Traits

Dispatchable
InteractsWithQueue
Queueable
SerializesModels

Methods

__construct(string $loanId, string $userName)

Create a new job instance.

void
handle()

Execute the job.

Details

__construct(string $loanId, string $userName)

Create a new job instance.

Parameters

string $loanId

UUID of the loan

string $userName

Name of the user performing the loan

void handle()

Execute the job.

Fetches the loan data and prints a receipt using the thermal printer service.

Return Value

void