LogAddedCustomerFile::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Listeners\Customers\Files;
4
5
use Illuminate\Support\Facades\Log;
6
use Illuminate\Support\Facades\Auth;
7
use App\Events\Customers\Files\CustomerFileAddedEvent;
8
9
class LogAddedCustomerFile
10
{
11
    /**
12
     * Handle the event
13
     */
14
    public function handle(CustomerFileAddedEvent $event)
15
    {
16
        Log::channel('cust')->info('New file has been added for '.$event->cust->name.' by '.Auth::user()->username.'.  Details - ', [
17
            'cust_id'   => $event->cust->cust_id,
18
            'file_id'   => $event->file->file_id,
19
            'file_name' => $event->file->name,
20
        ]);
21
    }
22
}
23