Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function handle(Event $event) |
||
18 | { |
||
19 | $model = config('firewall.models.user'); |
||
20 | |||
21 | if (!class_exists($model)) { |
||
22 | return; |
||
23 | } |
||
24 | |||
25 | $emails = config('firewall.notifications.mail.to'); |
||
26 | |||
27 | foreach ($emails as $email) { |
||
28 | $user = $model::where('email', $email)->first(); |
||
29 | |||
30 | if (empty($user)) { |
||
31 | continue; |
||
32 | } |
||
33 | |||
34 | $user->notify(new Notification($event->log)); |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 |