NNTmux /
newznab-tmux
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Jobs; |
||
| 4 | |||
| 5 | use App\Mail\AccountWillExpire; |
||
| 6 | use Illuminate\Bus\Queueable; |
||
| 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
| 8 | use Illuminate\Foundation\Bus\Dispatchable; |
||
| 9 | use Illuminate\Queue\InteractsWithQueue; |
||
| 10 | use Illuminate\Queue\SerializesModels; |
||
| 11 | use Illuminate\Support\Facades\Mail; |
||
| 12 | |||
| 13 | class SendAccountWillExpireEmail implements ShouldQueue |
||
| 14 | { |
||
| 15 | use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 16 | |||
| 17 | private $days; |
||
| 18 | |||
| 19 | private $user; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Create a new job instance. |
||
| 23 | * |
||
| 24 | * @return void |
||
| 25 | */ |
||
| 26 | public function __construct($user, $days) |
||
| 27 | { |
||
| 28 | $this->user = $user; |
||
| 29 | $this->days = $days; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Execute the job. |
||
| 34 | */ |
||
| 35 | public function handle(): void |
||
| 36 | { |
||
| 37 | Mail::to($this->user->email)->send(new AccountWillExpire($this->user, $this->days)); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |