*/ public $backoff = [2, 5, 10, 30]; /** * @param array $transactionsPerBank */ public function __construct( public User $user, public int $totalTransactions, public array $transactionsPerBank, ) { $this->onQueue('emails'); } public function envelope(): Envelope { return new Envelope( subject: __(':count new transactions synced on Whisper Money', ['count' => $this->totalTransactions]), ); } public function content(): Content { return new Content( markdown: 'mail.bank-transactions-synced', with: [ 'userName' => $this->user->name, 'transactionsPerBank' => $this->transactionsPerBank, ], ); } /** * Get the middleware the job should pass through. * * @return array */ public function middleware(): array { return [(new RateLimited('emails'))->releaseAfter(1)]; } }