\Notification::send($userToNotify,newAlert(\Auth::User()->id,"Ajout de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date,"/admin/calendar"));
\Notification::send($userToNotify,newmail(\Auth::User(),"Ajout d'une activité a l'horaire",\Auth::User()->fullname()." à ajouté l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date));
array_push($changes,"L'instructeur du niveau 1 pour la première période a été changé de ".\App\User::find($original->data['n1_p1_instructor'])->fullname()." à ".\App\User::find($schedule->data['n1_p1_instructor'])->fullname());
\Notification::send(\App\User::find($original->data['n1_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n1_p1_name']." du ".$original->date." vous a été retiré."));
\Notification::send(\App\User::find($schedule->data['n1_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n1_p1_name']." du ".$schedule->date." vous a été ajouté."));
array_push($changes,"L'instructeur du niveau 1 pour la deuxième période a été changé de ".\App\User::find($original->data['n1_p2_instructor'])->fullname()." à ".\App\User::find($schedule->data['n1_p2_instructor'])->fullname());
\Notification::send(\App\User::find($original->data['n1_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n1_p2_name']." du ".$original->date." vous a été retiré."));
\Notification::send(\App\User::find($schedule->data['n1_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n1_p2_name']." du ".$schedule->date." vous a été ajouté."));
array_push($changes,"L'instructeur du niveau 2 pour la première période a été changé de ".\App\User::find($original->data['n2_p1_instructor'])->fullname()." à ".\App\User::find($schedule->data['n2_p1_instructor'])->fullname());
\Notification::send(\App\User::find($original->data['n2_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n2_p1_name']." du ".$original->date." vous a été retiré."));
\Notification::send(\App\User::find($schedule->data['n2_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n2_p1_name']." du ".$schedule->date." vous a été ajouté."));
array_push($changes,"L'instructeur du niveau 2 pour la deuxième période a été changé de ".\App\User::find($original->data['n2_p2_instructor'])->fullname()." à ".\App\User::find($schedule->data['n2_p2_instructor'])->fullname());
\Notification::send(\App\User::find($original->data['n2_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n2_p2_name']." du ".$original->date." vous a été retiré."));
\Notification::send(\App\User::find($schedule->data['n2_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n2_p2_name']." du ".$schedule->date." vous a été ajouté."));
array_push($changes,"L'instructeur du niveau 3 pour la première période a été changé de ".\App\User::find($original->data['n3_p1_instructor'])->fullname()." à ".\App\User::find($schedule->data['n3_p1_instructor'])->fullname());
\Notification::send(\App\User::find($original->data['n3_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n3_p1_name']." du ".$original->date." vous a été retiré."));
\Notification::send(\App\User::find($schedule->data['n3_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n3_p1_name']." du ".$schedule->date." vous a été ajouté."));
array_push($changes,"L'instructeur du niveau 3 pour la deuxième période a été changé de ".\App\User::find($original->data['n3_p2_instructor'])->fullname()." à ".\App\User::find($schedule->data['n3_p2_instructor'])->fullname());
\Notification::send(\App\User::find($original->data['n3_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n3_p2_name']." du ".$original->date." vous a été retiré."));
\Notification::send(\App\User::find($schedule->data['n3_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n3_p2_name']." du ".$schedule->date." vous a été ajouté."));
array_push($changes,"L'OCOM du niveau 1 pour la première période a été changé de ".$original->data['n1_p1_ocom']." à ".$schedule->data['n1_p1_ocom']);
\Notification::send(\App\User::find($schedule->data['n1_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n1_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p1_ocom']));
array_push($changes,"L'OCOM du niveau 1 pour la deuxième période a été changé de ".$original->data['n1_p2_ocom']." à ".$schedule->data['n1_p2_ocom']);
\Notification::send(\App\User::find($schedule->data['n1_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n1_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p2_ocom']));
array_push($changes,"L'OCOM du niveau 2 pour la première période a été changé de ".$original->data['n2_p1_ocom']." à ".$schedule->data['n2_p1_ocom']);
\Notification::send(\App\User::find($schedule->data['n2_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n2_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p1_ocom']));
array_push($changes,"L'OCOM du niveau 2 pour la deuxième période a été changé de ".$original->data['n2_p2_ocom']." à ".$schedule->data['n2_p2_ocom']);
\Notification::send(\App\User::find($schedule->data['n2_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n2_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p2_ocom']));
array_push($changes,"L'OCOM du niveau 3 pour la première période a été changé de ".$original->data['n3_p1_ocom']." à ".$schedule->data['n3_p1_ocom']);
\Notification::send(\App\User::find($schedule->data['n3_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n3_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p1_ocom']));
array_push($changes,"L'OCOM du niveau 3 pour la deuxième période a été changé de ".$original->data['n3_p2_ocom']." à ".$schedule->data['n3_p2_ocom']);
\Notification::send(\App\User::find($schedule->data['n3_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n3_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p2_ocom']));
array_push($changes,"Le local du niveau 1 pour la première période a été changé de ".$original->data['n1_p1_local']." à ".$schedule->data['n1_p1_local']);
array_push($changes,"Le local du niveau 1 pour la deuxième période a été changé de ".$original->data['n1_p2_local']." à ".$schedule->data['n1_p2_local']);
array_push($changes,"Le local du niveau 2 pour la première période a été changé de ".$original->data['n2_p1_local']." à ".$schedule->data['n2_p1_local']);
array_push($changes,"Le local du niveau 2 pour la deuxième période a été changé de ".$original->data['n2_p2_local']." à ".$schedule->data['n2_p2_local']);
array_push($changes,"Le local du niveau 3 pour la première période a été changé de ".$original->data['n3_p1_local']." à ".$schedule->data['n3_p1_local']);
array_push($changes,"Le local du niveau 3 pour la deuxième période a été changé de ".$original->data['n3_p2_local']." à ".$schedule->data['n3_p2_local']);
array_push($changes,"Le nom du cours niveau 1 pour la première période a été changé de ".$original->data['n1_p1_name']." à ".$schedule->data['n1_p1_name']);
\Notification::send(\App\User::find($schedule->data['n1_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n1_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p1_name']));
array_push($changes,"Le nom du cours niveau 1 pour la deuxième période a été changé de ".$original->data['n1_p2_name']." à ".$schedule->data['n1_p2_name']);
\Notification::send(\App\User::find($schedule->data['n1_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n1_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p2_name']));
array_push($changes,"Le nom du cours niveau 2 pour la première période a été changé de ".$original->data['n2_p1_name']." à ".$schedule->data['n2_p1_name']);
\Notification::send(\App\User::find($schedule->data['n2_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n2_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p1_name']));
array_push($changes,"Le nom du cours niveau 2 pour la deuxième période a été changé de ".$original->data['n2_p2_name']." à ".$schedule->data['n2_p2_name']);
\Notification::send(\App\User::find($schedule->data['n2_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n2_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p2_name']));
array_push($changes,"Le nom du cours niveau 3 pour la première période a été changé de ".$original->data['n3_p1_name']." à ".$schedule->data['n3_p1_name']);
\Notification::send(\App\User::find($schedule->data['n3_p1_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n3_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p1_name']));
array_push($changes,"Le nom du cours niveau 3 pour la deuxième période a été changé de ".$original->data['n3_p2_name']." à ".$schedule->data['n3_p2_name']);
\Notification::send(\App\User::find($schedule->data['n3_p2_instructor']),newmail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n3_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p2_name']));
}
}
\Notification::send($userToNotify,newAlert(\Auth::User()->id,"Modification de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date,"/admin/calendar"));
\Notification::send($userToNotify,newmail(\Auth::User(),"Modification d'une activité a l'horaire",\Auth::User()->fullname()." à modifié l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date."<br>".$string_Change));
}
returnredirect('/admin/calendar');
}
publicfunctiondelete()
{
$id=request('id');
$schedule=Schedule::find($id);
$schedule->delete();
\Notification::send($userToNotify,newAlert(\Auth::User()->id,"Suppresion de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date,"/admin/calendar"));
\Notification::send($userToNotify,newmail(\Auth::User(),"Suppression d'une activité a l'horaire",\Auth::User()->fullname()." à supprimé l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date));
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.