<?php namespace App\Jobs; 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\Carbon; use Illuminate\Support\Facades\Log; class OrgStudentEnrolNotification implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; public $user, $plan; public function __construct($user, $plan) { $this->user = $user; $this->plan = $plan; } public function handle() { send_email($this->user, 'OrgSubscriptionEnrolled', [ 'time' => Carbon::now()->format('d-M-Y, g:i A'), 'plan' => $this->plan->title, ]); } }