new SendJoinerReminderEmails return class instance
SendLeaverReminderEmails::class path of class return string like App\Mails\SendLeaverReminderEmails
if you see job method
public function job($job, $queue = null, $connection = null)
{
return $this->call(function () use ($job, $queue, $connection) {
$job = is_string($job) ? Container::getInstance()->make($job) : $job;
if ($job instanceof ShouldQueue) {
$this->dispatchToQueue($job, $queue ?? $job->queue, $connection ?? $job->connection);
} else {
$this->dispatchNow($job);
}
})->name(is_string($job) ? $job : get_class($job));
}
here if $job param is string then it will try get instance from the container or else it will take instance from the $job param
$job = is_string($job) ? Container::getInstance()->make($job) : $job;
To check you can dd
dd(new SendJoinerReminderEmails)
or
dd(SendLeaverReminderEmails::class)