Complete the code to create a new job class using Artisan.
php artisan [1] MakeEmailJobUse make:job to create a new job class in Laravel.
Complete the code to dispatch a job named SendWelcomeEmail.
SendWelcomeEmail::[1]();Use dispatch() to send a job to the queue.
Fix the error in the job class constructor to accept a User model.
public function __construct([1] $user)
{
$this->user = $user;
}The constructor parameter should be type-hinted with the model class name User (capitalized).
Fill both blanks to define the job's queue connection.
public $[1] = '[2]';
Use public $connection = 'default'; to set the queue connection.
Fill the blanks to create a job class with a handle method that logs a message.
class LogJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; public function handle() { [1]::info([2]); } }
Use Log::info('Job executed successfully'); inside the handle method to log a message.
