The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Jobs\WatchAttendance: $id, $relations, $class, $keyBy
Loading history...
20
21
public int $tries = 5;
22
23
public function __construct(protected Attendance $attendance)
24
{
25
}
26
27
/**
28
* Execute the job.
29
*
30
* @return void
31
*/
32
public function handle()
33
{
34
if ($this->attendance->attendance_type_id == 4) {
35
// if so, send an email
36
$student = $this->attendance->student;
37
38
// CC to the teacher and the administration
39
$otherRecipients = [];
40
41
if ($this->attendance->event->teacher->email !== null) {