@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | |
24 | 24 | public function getUserCustomerFavs() |
25 | 25 | { |
26 | - $custFavs = CustomerFavs::where('user_id', $this->userID) |
|
27 | - ->with(array('Customers' => function($query){ |
|
26 | + $custFavs = CustomerFavs::where('user_id', $this->userID) |
|
27 | + ->with(array('Customers' => function($query) { |
|
28 | 28 | $query->select('cust_id', 'name'); |
29 | 29 | })) |
30 | 30 | ->get(); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | |
35 | 35 | public function getUserTechTipFavs() |
36 | 36 | { |
37 | - $tipFavs = TechTipFavs::where('user_id', $this->userID) |
|
38 | - ->with(array('TechTips' => function($query){ |
|
37 | + $tipFavs = TechTipFavs::where('user_id', $this->userID) |
|
38 | + ->with(array('TechTips' => function($query) { |
|
39 | 39 | $query->select('tip_id', 'subject'); |
40 | 40 | })) |
41 | 41 | ->get(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function getUserTotalLinks() |
53 | 53 | { |
54 | - $totalLinks = FileLinks::where('user_id', Auth::user()->user_id)->count(); |
|
54 | + $totalLinks = FileLinks::where('user_id', Auth::user()->user_id)->count(); |
|
55 | 55 | return $totalLinks; |
56 | 56 | } |
57 | 57 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function getUserCustomerFavs() |
25 | 25 | { |
26 | 26 | $custFavs = CustomerFavs::where('user_id', $this->userID) |
27 | - ->with(array('Customers' => function($query){ |
|
27 | + ->with(array('Customers' => function($query) { |
|
28 | 28 | $query->select('cust_id', 'name'); |
29 | 29 | })) |
30 | 30 | ->get(); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function getUserTechTipFavs() |
36 | 36 | { |
37 | 37 | $tipFavs = TechTipFavs::where('user_id', $this->userID) |
38 | - ->with(array('TechTips' => function($query){ |
|
38 | + ->with(array('TechTips' => function($query) { |
|
39 | 39 | $query->select('tip_id', 'subject'); |
40 | 40 | })) |
41 | 41 | ->get(); |
@@ -10,13 +10,13 @@ |
||
10 | 10 | { |
11 | 11 | public function getTipsInLastDays($numDays = 30) |
12 | 12 | { |
13 | - $tips = TechTips::where('created_at', '>', Carbon::now()->subDays($numDays))->count(); |
|
13 | + $tips = TechTips::where('created_at', '>', Carbon::now()->subDays($numDays))->count(); |
|
14 | 14 | return $tips; |
15 | 15 | } |
16 | 16 | |
17 | 17 | public function getTotalTechTipCount() |
18 | 18 | { |
19 | - $tipsTotal = TechTips::all()->count(); |
|
19 | + $tipsTotal = TechTips::all()->count(); |
|
20 | 20 | return $tipsTotal; |
21 | 21 | } |
22 | 22 | } |