Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
31 | 2 | public function userLinks() |
|
32 | { |
||
33 | 2 | $userLinks = new UserCollection( |
|
34 | 2 | User::where('active', 1) |
|
35 | 2 | ->withCount([ |
|
36 | 2 | 'FileLinks', |
|
37 | 'FileLinks as expired_file_links_count' => function($query) |
||
38 | { |
||
39 | 2 | $query->where('expire', '<', Carbon::now()); |
|
40 | 2 | } |
|
41 | ]) |
||
42 | 2 | ->get() |
|
43 | 2 | ->makeVisible('user_id') |
|
44 | ); |
||
45 | |||
46 | 2 | Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
47 | 2 | return view('admin.userLinks', [ |
|
48 | 2 | 'links' => $userLinks, |
|
49 | ]); |
||
64 |