@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | Log::channel('cust')->info('New Customer - '.$request->name.' created by '.Auth::user()->full_name); |
49 | 49 | |
50 | - return redirect(route('customers.show',$newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
50 | + return redirect(route('customers.show', $newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // ->with('ParentContact.CustomerContactPhone.PhoneNumberType') |
73 | 73 | ->with('CustomerNote') |
74 | 74 | ->firstOrFail(); |
75 | - $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
75 | + $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
76 | 76 | ->where('cust_id', $customer->cust_id) |
77 | 77 | ->count(); |
78 | 78 | |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | 'details' => $customer, |
81 | 81 | 'phone_types' => PhoneNumberType::all(), |
82 | 82 | 'user_functions' => [ |
83 | - 'fav' => $isFav, // Customer is bookmarked by the user |
|
84 | - 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
83 | + 'fav' => $isFav, // Customer is bookmarked by the user |
|
84 | + 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
85 | 85 | ], |
86 | 86 | ]); |
87 | 87 | } |