UserLogedNotification::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 2
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace App\Listeners;
4
5
use App\Events\LogedUser;
6
use App\Mail\Hello;
7
use Illuminate\Support\Facades\Mail;
8
9
class UserLogedNotification
10
{
11
    /**
12
     * Create the event listener.
13
     *
14
     * @return void
15
     */
16
    public function __construct()
17
    {
18
        //
19
    }
20
21
    /**
22
     * Handle the event.
23
     *
24
     * @param object $event
25
     *
26
     * @return void
27
     */
28
    public function handle(LogedUser $event)
29
    {
30
        $hello = new Hello($event->user);
31
        Mail::to($event->user)->send($hello);
32
    }
33
}
34