SendLoanOverdueJob
class SendLoanOverdueJob implements ShouldQueue (View source)
Job responsible for sending an overdue loan notification.
This queued job sends an email notifying the user that the loan period has expired. The job is processed asynchronously to prevent delays in the application flow while handling email dispatch.
Traits
Dispatchable
InteractsWithQueue
Queueable
SerializesModels
Properties
| protected string | $loanId | The unique identifier of the loan, used to fetch the necessary information. |
Methods
__construct(string $loanId)
Create a new job instance.
void
Details
__construct(string $loanId)
Create a new job instance.
void
handle(EmailService $emailService)
Execute the job to send the overdue loan notification email.
This method fetches the loan data and sends the overdue notification email using the injected email service.