for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Jobs;
use App\Mail\SendInvite;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Mail;
class SendInviteEmail implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
Illuminate\Queue\SerializesModels
App\Jobs\SendInviteEmail
$collectionClass
$id
$relations
$class
$keyBy
Illuminate\Queue\InteractsWithQueue
$failedWith
$releaseDelay
private $email;
private $userId;
$userId
private $url;
/**
* @var \App\Models\User
*/
private $user;
* SendInviteEmail constructor.
public function __construct($email, $user, $url)
$this->email = $email;
$this->user = $user;
$this->url = $url;
}
* Execute the job.
public function handle(): void
Mail::to($this->email)->send(new SendInvite($this->user, $this->url));