Total Complexity | 6 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class GetUserStats |
||
16 | { |
||
17 | protected $userID; |
||
18 | |||
19 | public function __construct($userID = null) |
||
22 | } |
||
23 | |||
24 | public function getUserCustomerFavs() |
||
25 | { |
||
26 | $custFavs = CustomerFavs::where('user_id', $this->userID) |
||
27 | ->with(array('Customers' => function($query){ |
||
28 | $query->select('cust_id', 'name'); |
||
29 | })) |
||
30 | ->get(); |
||
31 | |||
32 | return $custFavs; |
||
33 | } |
||
34 | |||
35 | public function getUserTechTipFavs() |
||
44 | } |
||
45 | |||
46 | public function getUserActiveFileLinks() |
||
47 | { |
||
48 | $activeLinks = FileLinks::where('user_id', Auth::user()->user_id)->where('expire', '>', Carbon::now())->count(); |
||
49 | return $activeLinks; |
||
50 | } |
||
51 | |||
52 | public function getUserTotalLinks() |
||
56 | } |
||
57 | } |
||
58 |