1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Jobs;
- use Illuminate\Contracts\Mail\Mailer;
- use Illuminate\Contracts\Queue\ShouldQueue;
- use Illuminate\Foundation\Bus\Dispatchable;
- use Illuminate\Queue\InteractsWithQueue;
- use Illuminate\Queue\SerializesModels;
- class SendTestEmail extends Job implements ShouldQueue
- {
- use Dispatchable, InteractsWithQueue, SerializesModels;
- protected $user;
- /**
- * Create a new job instance.
- *
- * @return void
- */
- public function __construct($user)
- {
- //
- $this->user = $user;
- }
- /**
- * Execute the job.
- *
- * @return void
- */
- public function handle(Mailer $mailer)
- {
- //
- \Log::info('============延迟队列执行=========');
- \Log::info($this->user);
- }
- }
|