Completed
Push — development ( 90583d...091e84 )
by Bhanu
18:00 queued 08:04
created
app/Http/Controllers/Front/BaseClientController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -168,9 +168,9 @@
 block discarded – undo
168 168
             }
169 169
 
170 170
             return \DataTables::of($invoices->get())
171
-             ->addColumn('number', function ($model) {
172
-                 return $model->number;
173
-             })
171
+                ->addColumn('number', function ($model) {
172
+                    return $model->number;
173
+                })
174 174
             ->addColumn('products', function ($model) {
175 175
                 $invoice = $this->invoice->find($model->id);
176 176
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD',
55 55
                 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users',
56 56
 
57
-                 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
58
-                 'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status'));
57
+                    'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
58
+                    'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status'));
59 59
     }
60 60
 
61 61
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         // dd($currentYear,$currentMonth );
153 153
         $total = Invoice::whereYear('created_at', '=', $currentYear)->whereMonth('created_at', '=', $currentMonth)
154 154
                 ->where('currency', 'USD')
155
-                 ->where('status', '=', 'success')
155
+                    ->where('status', '=', 'success')
156 156
                 ->pluck('grand_total')->all();
157 157
         $grandTotal = array_sum($total);
158 158
 
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
     public function getAllUsers()
200 200
     {
201 201
         $allUsers = User::orderBy('created_at', 'desc')->where('active', 1)->where('mobile_verified', 1)
202
-              ->take(20)
203
-              ->get()
204
-              ->toArray();
202
+                ->take(20)
203
+                ->get()
204
+                ->toArray();
205 205
 
206 206
         return $allUsers;
207 207
     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $dayUtc = new Carbon('-30 days');
237 237
         $minus30Day = $dayUtc->toDateTimeString();
238 238
         $recentOrders = Order::where('created_at', '>', $minus30Day)->orderBy('created_at', 'desc')
239
-                 ->where('price_override', '>', 0)->get();
239
+                    ->where('price_override', '>', 0)->get();
240 240
 
241 241
         return $recentOrders;
242 242
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD',
55 55
                 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users',
56 56
 
57
-                 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
57
+                 'count_users', 'arraylists', 'productSoldlists', 'orders', 'subscriptions', 'invoices',
58 58
                  'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status'));
59 59
     }
60 60
 
Please login to merge, or discard this patch.
app/Http/Controllers/Order/OrderController.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -142,36 +142,36 @@
 block discarded – undo
142 142
                             return $url;
143 143
                         })
144 144
 
145
-                         ->filterColumn('created_at', function ($query, $keyword) {
146
-                             $sql = 'created_at like ?';
147
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
148
-                         })
149
-
150
-                          ->filterColumn('client', function ($query, $keyword) {
151
-                              $sql = 'client like ?';
152
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
153
-                          })
154
-
155
-                           ->filterColumn('number', function ($query, $keyword) {
156
-                               $sql = 'number like ?';
157
-                               $query->whereRaw($sql, ["%{$keyword}%"]);
158
-                           })
145
+                            ->filterColumn('created_at', function ($query, $keyword) {
146
+                                $sql = 'created_at like ?';
147
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
148
+                            })
149
+
150
+                            ->filterColumn('client', function ($query, $keyword) {
151
+                                $sql = 'client like ?';
152
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
153
+                            })
154
+
155
+                            ->filterColumn('number', function ($query, $keyword) {
156
+                                $sql = 'number like ?';
157
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
158
+                            })
159 159
                             ->filterColumn('price_override', function ($query, $keyword) {
160 160
                                 $sql = 'price_override like ?';
161 161
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
162 162
                             })
163
-                             ->filterColumn('order_status', function ($query, $keyword) {
164
-                                 $sql = 'order_status like ?';
165
-                                 $query->whereRaw($sql, ["%{$keyword}%"]);
166
-                             })
167
-
168
-                              ->filterColumn('ends_at', function ($query, $keyword) {
169
-                                  $sql = 'ends_at like ?';
170
-                                  $query->whereRaw($sql, ["%{$keyword}%"]);
171
-                              })
172
-
173
-                         ->rawColumns(['checkbox', 'date', 'client', 'number',
174
-                          'price_override', 'order_status', 'ends_at', 'action', ])
163
+                                ->filterColumn('order_status', function ($query, $keyword) {
164
+                                    $sql = 'order_status like ?';
165
+                                    $query->whereRaw($sql, ["%{$keyword}%"]);
166
+                                })
167
+
168
+                                ->filterColumn('ends_at', function ($query, $keyword) {
169
+                                    $sql = 'ends_at like ?';
170
+                                    $query->whereRaw($sql, ["%{$keyword}%"]);
171
+                                })
172
+
173
+                            ->rawColumns(['checkbox', 'date', 'client', 'number',
174
+                            'price_override', 'order_status', 'ends_at', 'action', ])
175 175
                         ->make(true);
176 176
     }
177 177
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
 
103 103
         return \DataTables::of($query->take(100))
104 104
                         ->setTotalRecords($query->count())
105
-                        ->addColumn('checkbox', function ($model) {
105
+                        ->addColumn('checkbox', function($model) {
106 106
                             return "<input type='checkbox' class='order_checkbox' value=".
107 107
                             $model->id.' name=select[] id=check>';
108 108
                         })
109
-                        ->addColumn('date', function ($model) {
109
+                        ->addColumn('date', function($model) {
110 110
                             $date = $model->created_at;
111 111
 
112 112
                             return "<span style='display:none'>$model->id</span>".$date;
113 113
                         })
114
-                        ->addColumn('client', function ($model) {
114
+                        ->addColumn('client', function($model) {
115 115
                             $user = $this->user->where('id', $model->client)->first();
116 116
                             $first = $user->first_name;
117 117
                             $last = $user->last_name;
@@ -119,22 +119,22 @@  discard block
 block discarded – undo
119 119
 
120 120
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'<a>';
121 121
                         })
122
-                        ->addColumn('number', function ($model) {
122
+                        ->addColumn('number', function($model) {
123 123
                             return ucfirst($model->number);
124 124
                         })
125
-                        ->addColumn('price_override', function ($model) {
125
+                        ->addColumn('price_override', function($model) {
126 126
                             return ucfirst($model->price_override);
127 127
                         })
128
-                        ->addColumn('order_status', function ($model) {
128
+                        ->addColumn('order_status', function($model) {
129 129
                             return ucfirst($model->order_status);
130 130
                         })
131 131
                         // ->showColumns('number', 'price_override', 'order_status')
132
-                        ->addColumn('ends_at', function ($model) {
132
+                        ->addColumn('ends_at', function($model) {
133 133
                             $end = $this->getEndDate($model);
134 134
 
135 135
                             return $end;
136 136
                         })
137
-                        ->addColumn('action', function ($model) {
137
+                        ->addColumn('action', function($model) {
138 138
                             $sub = $model->subscription()->first();
139 139
                             $status = $this->checkInvoiceStatusByOrderId($model->id);
140 140
                             $url = $this->getUrl($model, $status, $sub);
@@ -142,30 +142,30 @@  discard block
 block discarded – undo
142 142
                             return $url;
143 143
                         })
144 144
 
145
-                         ->filterColumn('created_at', function ($query, $keyword) {
145
+                         ->filterColumn('created_at', function($query, $keyword) {
146 146
                              $sql = 'created_at like ?';
147 147
                              $query->whereRaw($sql, ["%{$keyword}%"]);
148 148
                          })
149 149
 
150
-                          ->filterColumn('client', function ($query, $keyword) {
150
+                          ->filterColumn('client', function($query, $keyword) {
151 151
                               $sql = 'client like ?';
152 152
                               $query->whereRaw($sql, ["%{$keyword}%"]);
153 153
                           })
154 154
 
155
-                           ->filterColumn('number', function ($query, $keyword) {
155
+                           ->filterColumn('number', function($query, $keyword) {
156 156
                                $sql = 'number like ?';
157 157
                                $query->whereRaw($sql, ["%{$keyword}%"]);
158 158
                            })
159
-                            ->filterColumn('price_override', function ($query, $keyword) {
159
+                            ->filterColumn('price_override', function($query, $keyword) {
160 160
                                 $sql = 'price_override like ?';
161 161
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
162 162
                             })
163
-                             ->filterColumn('order_status', function ($query, $keyword) {
163
+                             ->filterColumn('order_status', function($query, $keyword) {
164 164
                                  $sql = 'order_status like ?';
165 165
                                  $query->whereRaw($sql, ["%{$keyword}%"]);
166 166
                              })
167 167
 
168
-                              ->filterColumn('ends_at', function ($query, $keyword) {
168
+                              ->filterColumn('ends_at', function($query, $keyword) {
169 169
                                   $sql = 'ends_at like ?';
170 170
                                   $query->whereRaw($sql, ["%{$keyword}%"]);
171 171
                               })
Please login to merge, or discard this patch.
app/Http/Controllers/Order/InvoiceController.php 2 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
         $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till);
126 126
 
127 127
         return \DataTables::of($query->take(100))
128
-         ->setTotalRecords($query->count())
128
+            ->setTotalRecords($query->count())
129 129
 
130
-         ->addColumn('checkbox', function ($model) {
131
-             return "<input type='checkbox' class='invoice_checkbox' 
130
+            ->addColumn('checkbox', function ($model) {
131
+                return "<input type='checkbox' class='invoice_checkbox' 
132 132
                             value=".$model->id.' name=select[] id=check>';
133
-         })
133
+            })
134 134
                         ->addColumn('user_id', function ($model) {
135 135
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
136 136
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
 
139 139
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
140 140
                         })
141
-                         ->addColumn('number', function ($model) {
142
-                             return ucfirst($model->number);
143
-                         })
141
+                            ->addColumn('number', function ($model) {
142
+                                return ucfirst($model->number);
143
+                            })
144 144
 
145 145
                         ->addColumn('date', function ($model) {
146 146
                             $date = ($model->created_at);
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
                             return $date;
149 149
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
150 150
                         })
151
-                         ->addColumn('grand_total', function ($model) {
152
-                             return ucfirst($model->number);
153
-                         })
154
-                          ->addColumn('status', function ($model) {
155
-                              return ucfirst($model->status);
156
-                          })
151
+                            ->addColumn('grand_total', function ($model) {
152
+                                return ucfirst($model->number);
153
+                            })
154
+                            ->addColumn('status', function ($model) {
155
+                                return ucfirst($model->status);
156
+                            })
157 157
 
158 158
                         ->addColumn('action', function ($model) {
159 159
                             $action = '';
@@ -171,30 +171,30 @@  discard block
 block discarded – undo
171 171
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
172 172
                                     ."   $action";
173 173
                         })
174
-                         ->filterColumn('user_id', function ($query, $keyword) {
175
-                             $sql = 'first_name like ?';
176
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
177
-                         })
174
+                            ->filterColumn('user_id', function ($query, $keyword) {
175
+                                $sql = 'first_name like ?';
176
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
177
+                            })
178 178
 
179
-                          ->filterColumn('status', function ($query, $keyword) {
180
-                              $sql = 'status like ?';
181
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
182
-                          })
179
+                            ->filterColumn('status', function ($query, $keyword) {
180
+                                $sql = 'status like ?';
181
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
182
+                            })
183 183
 
184 184
                         ->filterColumn('number', function ($query, $keyword) {
185 185
                             $sql = 'number like ?';
186 186
                             $query->whereRaw($sql, ["%{$keyword}%"]);
187 187
                         })
188
-                         ->filterColumn('grand_total', function ($query, $keyword) {
189
-                             $sql = 'grand_total like ?';
190
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
191
-                         })
192
-                          ->filterColumn('date', function ($query, $keyword) {
193
-                              $sql = 'date like ?';
194
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
195
-                          })
196
-
197
-                         ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
188
+                            ->filterColumn('grand_total', function ($query, $keyword) {
189
+                                $sql = 'grand_total like ?';
190
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
191
+                            })
192
+                            ->filterColumn('date', function ($query, $keyword) {
193
+                                $sql = 'date like ?';
194
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
195
+                            })
196
+
197
+                            ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
198 198
                         ->make(true);
199 199
     }
200 200
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at');
235 235
 
236 236
         $join = $join->orderBy('created_at', 'desc')
237
-         ->select('invoices.id','first_name','invoices.created_at',
237
+            ->select('invoices.id','first_name','invoices.created_at',
238 238
             'invoices.currency', 'user_id', 'number', 'status');
239 239
 
240 240
         return $join;
@@ -384,8 +384,8 @@  discard block
 block discarded – undo
384 384
             $symbol = $attributes[0]['currency'][0]['code'];
385 385
             //dd($symbol);
386 386
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
387
-             'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
388
-             'currency'                                  => $symbol, ]);
387
+                'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
388
+                'currency'                                  => $symbol, ]);
389 389
 
390 390
             foreach (\Cart::getContent() as $cart) {
391 391
                 $this->createInvoiceItems($invoice->id, $cart);
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                 'currency'                        => $currency, 'status' => 'pending', 'description' => $description, ]);
490 490
 
491 491
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
492
-             $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
492
+                $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
493 493
             $result = $this->getMessage($items, $user_id);
494 494
         } catch (\Exception $ex) {
495 495
             app('log')->useDailyFiles(storage_path().'/laravel.log');
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
                 } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
639 639
 
640 640
                     $taxClassId = Tax::where('country', '')->where('state', 'Any State')
641
-                     ->pluck('tax_classes_id')->first(); //In case of India when
641
+                        ->pluck('tax_classes_id')->first(); //In case of India when
642 642
                     //other tax is available and tax is not enabled
643 643
                     if ($taxClassId) {
644 644
                         $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -707,10 +707,10 @@  discard block
 block discarded – undo
707 707
         foreach ($taxes as $key => $tax) {
708 708
             if ($taxes[0]) {
709 709
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
710
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
711
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
712
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
713
-                  'origin_state'               => $origin_state, ];
710
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
711
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
712
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
713
+                    'origin_state'               => $origin_state, ];
714 714
 
715 715
                 $rate = $tax->rate;
716 716
 
@@ -920,8 +920,8 @@  discard block
 block discarded – undo
920 920
                 }
921 921
 
922 922
                 return view('themes.default1.invoice.payment',
923
-                 compact('invoice_status', 'payment_status',
924
-                  'payment_method', 'invoice_id', 'domain', 'invoice', 'userid'));
923
+                    compact('invoice_status', 'payment_status',
924
+                    'payment_method', 'invoice_id', 'domain', 'invoice', 'userid'));
925 925
             }
926 926
 
927 927
             return redirect()->back();
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
                 case 1:
960 960
                     $percentage = $price * ($value / 100);
961 961
 
962
-                     return $price - $percentage;
962
+                        return $price - $percentage;
963 963
                 case 2:
964 964
                     return $price - $value;
965 965
                 case 3:
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
             $payment_date = \Carbon\Carbon::now()->toDateTimeString();
992 992
             $amount = $grand_total;
993 993
             $paymentRenewal = $this->updateInvoicePayment($invoiceid, $payment_method,
994
-             $payment_status, $payment_date, $amount);
994
+                $payment_status, $payment_date, $amount);
995 995
 
996 996
             return redirect()->back()->with('success', 'Payment Accepted Successfully');
997 997
         } catch (\Exception $ex) {
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $from = $request->input('from');
105 105
             $till = $request->input('till');
106 106
 
107
-            return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from',
107
+            return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from',
108 108
 
109 109
                 'till'));
110 110
         } catch (\Exception $ex) {
@@ -127,35 +127,35 @@  discard block
 block discarded – undo
127 127
         return \DataTables::of($query->take(100))
128 128
          ->setTotalRecords($query->count())
129 129
 
130
-         ->addColumn('checkbox', function ($model) {
130
+         ->addColumn('checkbox', function($model) {
131 131
              return "<input type='checkbox' class='invoice_checkbox' 
132 132
                             value=".$model->id.' name=select[] id=check>';
133 133
          })
134
-                        ->addColumn('user_id', function ($model) {
134
+                        ->addColumn('user_id', function($model) {
135 135
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
136 136
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
137 137
                             $id = $this->user->where('id', $model->user_id)->first()->id;
138 138
 
139 139
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
140 140
                         })
141
-                         ->addColumn('number', function ($model) {
141
+                         ->addColumn('number', function($model) {
142 142
                              return ucfirst($model->number);
143 143
                          })
144 144
 
145
-                        ->addColumn('date', function ($model) {
145
+                        ->addColumn('date', function($model) {
146 146
                             $date = ($model->created_at);
147 147
 
148 148
                             return $date;
149 149
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
150 150
                         })
151
-                         ->addColumn('grand_total', function ($model) {
151
+                         ->addColumn('grand_total', function($model) {
152 152
                              return ucfirst($model->number);
153 153
                          })
154
-                          ->addColumn('status', function ($model) {
154
+                          ->addColumn('status', function($model) {
155 155
                               return ucfirst($model->status);
156 156
                           })
157 157
 
158
-                        ->addColumn('action', function ($model) {
158
+                        ->addColumn('action', function($model) {
159 159
                             $action = '';
160 160
 
161 161
                             $check = $this->checkExecution($model->id);
@@ -171,25 +171,25 @@  discard block
 block discarded – undo
171 171
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
172 172
                                     ."   $action";
173 173
                         })
174
-                         ->filterColumn('user_id', function ($query, $keyword) {
174
+                         ->filterColumn('user_id', function($query, $keyword) {
175 175
                              $sql = 'first_name like ?';
176 176
                              $query->whereRaw($sql, ["%{$keyword}%"]);
177 177
                          })
178 178
 
179
-                          ->filterColumn('status', function ($query, $keyword) {
179
+                          ->filterColumn('status', function($query, $keyword) {
180 180
                               $sql = 'status like ?';
181 181
                               $query->whereRaw($sql, ["%{$keyword}%"]);
182 182
                           })
183 183
 
184
-                        ->filterColumn('number', function ($query, $keyword) {
184
+                        ->filterColumn('number', function($query, $keyword) {
185 185
                             $sql = 'number like ?';
186 186
                             $query->whereRaw($sql, ["%{$keyword}%"]);
187 187
                         })
188
-                         ->filterColumn('grand_total', function ($query, $keyword) {
188
+                         ->filterColumn('grand_total', function($query, $keyword) {
189 189
                              $sql = 'grand_total like ?';
190 190
                              $query->whereRaw($sql, ["%{$keyword}%"]);
191 191
                          })
192
-                          ->filterColumn('date', function ($query, $keyword) {
192
+                          ->filterColumn('date', function($query, $keyword) {
193 193
                               $sql = 'date like ?';
194 194
                               $query->whereRaw($sql, ["%{$keyword}%"]);
195 195
                           })
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at');
235 235
 
236 236
         $join = $join->orderBy('created_at', 'desc')
237
-         ->select('invoices.id','first_name','invoices.created_at',
237
+         ->select('invoices.id', 'first_name', 'invoices.created_at',
238 238
             'invoices.currency', 'user_id', 'number', 'status');
239 239
 
240 240
         return $join;
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SettingsController.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -201,16 +201,16 @@  discard block
 block discarded – undo
201 201
 
202 202
             return \DataTables::of($activity_log->take(50))
203 203
              ->setTotalRecords($activity_log->count())
204
-             ->addColumn('checkbox', function ($model) {
204
+             ->addColumn('checkbox', function($model) {
205 205
                  return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
206 206
              })
207
-                           ->addColumn('name', function ($model) {
207
+                           ->addColumn('name', function($model) {
208 208
                                return ucfirst($model->log_name);
209 209
                            })
210
-                             ->addColumn('description', function ($model) {
210
+                             ->addColumn('description', function($model) {
211 211
                                  return ucfirst($model->description);
212 212
                              })
213
-                          ->addColumn('username', function ($model) {
213
+                          ->addColumn('username', function($model) {
214 214
                               $causer_id = $model->causer_id;
215 215
                               $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
216 216
                               foreach ($names as $key => $value) {
@@ -219,41 +219,41 @@  discard block
 block discarded – undo
219 219
                                   return $fullName;
220 220
                               }
221 221
                           })
222
-                              ->addColumn('role', function ($model) {
222
+                              ->addColumn('role', function($model) {
223 223
                                   $causer_id = $model->causer_id;
224 224
                                   $role = User::where('id', $causer_id)->pluck('role');
225 225
 
226 226
                                   return json_decode($role);
227 227
                               })
228
-                               ->addColumn('new', function ($model) {
228
+                               ->addColumn('new', function($model) {
229 229
                                    $properties = ($model->properties);
230 230
                                    $newEntry = $this->getNewEntry($properties, $model);
231 231
 
232 232
                                    return $newEntry;
233 233
                                })
234
-                                ->addColumn('old', function ($model) {
234
+                                ->addColumn('old', function($model) {
235 235
                                     $data = ($model->properties);
236 236
                                     $oldEntry = $this->getOldEntry($data, $model);
237 237
 
238 238
                                     return $oldEntry;
239 239
                                 })
240
-                                ->addColumn('created_at', function ($model) {
240
+                                ->addColumn('created_at', function($model) {
241 241
                                     $newDate = $this->getDate($model->created_at);
242 242
 
243 243
                                     return $newDate;
244 244
                                 })
245 245
 
246
-                                    ->filterColumn('log_name', function ($query, $keyword) {
246
+                                    ->filterColumn('log_name', function($query, $keyword) {
247 247
                                         $sql = 'log_name like ?';
248 248
                                         $query->whereRaw($sql, ["%{$keyword}%"]);
249 249
                                     })
250 250
 
251
-                                ->filterColumn('description', function ($query, $keyword) {
251
+                                ->filterColumn('description', function($query, $keyword) {
252 252
                                     $sql = 'description like ?';
253 253
                                     $query->whereRaw($sql, ["%{$keyword}%"]);
254 254
                                 })
255 255
 
256
-                            ->filterColumn('causer_id', function ($query, $keyword) {
256
+                            ->filterColumn('causer_id', function($query, $keyword) {
257 257
                                 $sql = 'first_name like ?';
258 258
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
259 259
                             })
@@ -274,38 +274,38 @@  discard block
 block discarded – undo
274 274
             $email_log = \DB::table('email_log')->get();
275 275
 
276 276
             return\ DataTables::of($email_log)
277
-             ->addColumn('checkbox', function ($model) {
277
+             ->addColumn('checkbox', function($model) {
278 278
                  return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
279 279
              })
280
-                           ->addColumn('date', function ($model) {
280
+                           ->addColumn('date', function($model) {
281 281
                                return ucfirst($model->date);
282 282
                            })
283
-                             ->addColumn('from', function ($model) {
283
+                             ->addColumn('from', function($model) {
284 284
                                  $from = Markdown::convertToHtml(ucfirst($model->from));
285 285
 
286 286
                                  return $from;
287 287
                              })
288
-                              ->addColumn('to', function ($model) {
288
+                              ->addColumn('to', function($model) {
289 289
                                   $to = Markdown::convertToHtml(ucfirst($model->to));
290 290
 
291 291
                                   return $to;
292 292
                               })
293
-                             ->addColumn('cc', function ($model) {
293
+                             ->addColumn('cc', function($model) {
294 294
                                  $cc = '--';
295 295
 
296 296
                                  return $cc;
297 297
                              })
298 298
 
299
-                               ->addColumn('subject', function ($model) {
299
+                               ->addColumn('subject', function($model) {
300 300
                                    return ucfirst($model->subject);
301 301
                                })
302 302
 
303
-                              ->addColumn('headers', function ($model) {
303
+                              ->addColumn('headers', function($model) {
304 304
                                   $headers = Markdown::convertToHtml(ucfirst($model->headers));
305 305
 
306 306
                                   return $headers;
307 307
                               })
308
-                              ->addColumn('status', function ($model) {
308
+                              ->addColumn('status', function($model) {
309 309
                                   return ucfirst($model->status);
310 310
                               })
311 311
 
Please login to merge, or discard this patch.
app/Http/Controllers/User/ClientController.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -72,29 +72,29 @@  discard block
 block discarded – undo
72 72
         $position = $request->input('position');
73 73
 
74 74
         $user = $this->advanceSearch($name, $username, $company,
75
-         $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position);
75
+            $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position);
76 76
 
77 77
         return\ DataTables::of($user->get())
78
-                         ->addColumn('checkbox', function ($model) {
79
-                             return "<input type='checkbox' class='user_checkbox' 
78
+                            ->addColumn('checkbox', function ($model) {
79
+                                return "<input type='checkbox' class='user_checkbox' 
80 80
                             value=".$model->id.' name=select[] id=check>';
81
-                         })
81
+                            })
82 82
                         ->addColumn('first_name', function ($model) {
83 83
                             return '<a href='.url('clients/'.$model->id).'>'
84 84
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
85 85
                         })
86
-                         ->addColumn('email', function ($model) {
87
-                             return $model->email;
88
-                         })
89
-                          ->addColumn('created_at', function ($model) {
90
-                              $ends = $model->created_at;
91
-                              if ($ends) {
92
-                                  $date = date_create($ends);
93
-                                  $end = date_format($date, 'l, F j, Y H:m');
94
-                              }
95
-
96
-                              return $end;
97
-                          })
86
+                            ->addColumn('email', function ($model) {
87
+                                return $model->email;
88
+                            })
89
+                            ->addColumn('created_at', function ($model) {
90
+                                $ends = $model->created_at;
91
+                                if ($ends) {
92
+                                    $date = date_create($ends);
93
+                                    $end = date_format($date, 'l, F j, Y H:m');
94
+                                }
95
+
96
+                                return $end;
97
+                            })
98 98
                         // ->showColumns('email', 'created_at')
99 99
                         ->addColumn('active', function ($model) {
100 100
                             if ($model->active == 1) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
             return view('themes.default1.user.client.show',
195 195
                 compact('id', 'client', 'invoices', 'model_popup', 'orders',
196
-                 'payments', 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency'));
196
+                    'payments', 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency'));
197 197
         } catch (\Exception $ex) {
198 198
             app('log')->useDailyFiles(storage_path().'/logs/laravel.log');
199 199
             app('log')->info($ex->getMessage());
@@ -351,9 +351,9 @@  discard block
 block discarded – undo
351 351
                 return \Response::json([]);
352 352
             }
353 353
             $users = User::where('email', 'LIKE', '%'.$term.'%')
354
-             ->orWhere('first_name', 'LIKE', '%'.$term.'%')
355
-             ->orWhere('last_name', 'LIKE', '%'.$term.'%')
356
-             ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get();
354
+                ->orWhere('first_name', 'LIKE', '%'.$term.'%')
355
+                ->orWhere('last_name', 'LIKE', '%'.$term.'%')
356
+                ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get();
357 357
             $formatted_tags = [];
358 358
 
359 359
             foreach ($users as $user) {
@@ -369,8 +369,8 @@  discard block
 block discarded – undo
369 369
     }
370 370
 
371 371
     public function advanceSearch($name = '', $username = '', $company = '',
372
-     $mobile = '', $email = '', $country = '', $industry = '',
373
-      $company_type = '', $company_size = '', $role = '', $position = '')
372
+        $mobile = '', $email = '', $country = '', $industry = '',
373
+        $company_type = '', $company_size = '', $role = '', $position = '')
374 374
     {
375 375
         $join = \DB::table('users');
376 376
         $join = $this->getNamUserCom($join, $name, $username, $company);
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 
381 381
         $join = $join->orderBy('created_at', 'desc')
382 382
         ->select('id', 'first_name', 'last_name', 'email', 'created_at',
383
-         'active', 'mobile_verified', 'role', 'position');
383
+            'active', 'mobile_verified', 'role', 'position');
384 384
 
385 385
         return $join;
386 386
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
          $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position);
76 76
 
77 77
         return\ DataTables::of($user->get())
78
-                         ->addColumn('checkbox', function ($model) {
78
+                         ->addColumn('checkbox', function($model) {
79 79
                              return "<input type='checkbox' class='user_checkbox' 
80 80
                             value=".$model->id.' name=select[] id=check>';
81 81
                          })
82
-                        ->addColumn('first_name', function ($model) {
82
+                        ->addColumn('first_name', function($model) {
83 83
                             return '<a href='.url('clients/'.$model->id).'>'
84 84
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
85 85
                         })
86
-                         ->addColumn('email', function ($model) {
86
+                         ->addColumn('email', function($model) {
87 87
                              return $model->email;
88 88
                          })
89
-                          ->addColumn('created_at', function ($model) {
89
+                          ->addColumn('created_at', function($model) {
90 90
                               $ends = $model->created_at;
91 91
                               if ($ends) {
92 92
                                   $date = date_create($ends);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                               return $end;
97 97
                           })
98 98
                         // ->showColumns('email', 'created_at')
99
-                        ->addColumn('active', function ($model) {
99
+                        ->addColumn('active', function($model) {
100 100
                             if ($model->active == 1) {
101 101
                                 $email = "<span class='glyphicon glyphicon-envelope'
102 102
                                  style='color:green' title='verified email'></span>";
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
                             return $email.'&nbsp;&nbsp;'.$mobile;
116 116
                         })
117
-                        ->addColumn('action', function ($model) {
117
+                        ->addColumn('action', function($model) {
118 118
                             return '<a href='.url('clients/'.$model->id.'/edit')
119 119
                             ." class='btn btn-sm btn-primary btn-xs'>
120 120
                             <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>"
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                                     <i class='fa fa-eye' style='color:white;'> </i>&nbsp;&nbsp;View</a>";
124 124
                             // return 'hhhh';
125 125
                         })
126
-                        ->rawColumns(['checkbox', 'first_name', 'email',  'created_at', 'active', 'action'])
126
+                        ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action'])
127 127
                         ->make(true);
128 128
 
129 129
         // ->searchColumns('email', 'first_name')
Please login to merge, or discard this patch.