@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | Log::channel('cust')->info('New Customer - '.$request->name.' created by '.Auth::user()->full_name); |
50 | 50 | |
51 | - return redirect(route('customers.show',$newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
51 | + return redirect(route('customers.show', $newCust->slug))->with(['message' => 'New Customer Created', 'type' => 'success']); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ->with('CustomerFile.FileUpload') |
77 | 77 | // ->with('ParentFile') |
78 | 78 | ->firstOrFail(); |
79 | - $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
79 | + $isFav = UserCustomerBookmark::where('user_id', Auth::user()->user_id) |
|
80 | 80 | ->where('cust_id', $customer->cust_id) |
81 | 81 | ->count(); |
82 | 82 | |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | 'phone_types' => PhoneNumberType::all(), |
86 | 86 | 'file_types' => CustomerFileType::all(), |
87 | 87 | 'user_functions' => [ |
88 | - 'fav' => $isFav, // Customer is bookmarked by the user |
|
89 | - 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
88 | + 'fav' => $isFav, // Customer is bookmarked by the user |
|
89 | + 'edit' => Auth::user()->can('update', $customer), // User is allowed to edit the customers basic details |
|
90 | 90 | ], |
91 | 91 | ]); |
92 | 92 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | // Sanitize the filename to remove any illegal characters and spaces |
65 | 65 | protected function cleanFilename($name) |
66 | 66 | { |
67 | - $newName = preg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $name); |
|
67 | + $newName = preg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $name); |
|
68 | 68 | Log::debug('Cleaned Filename', ['original_name' => $name, 'clean_name' => $newName]); |
69 | 69 | |
70 | 70 | return $newName; |