Completed
Branch feature-dynamic-fields (9e5831)
by Ashutosh
13:15
created
app/Http/Controllers/Front/BaseClientController.php 3 patches
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.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -182,27 +182,27 @@
 block discarded – undo
182 182
             }
183 183
 
184 184
             return \DataTables::of($invoices->get())
185
-             ->addColumn('number', function ($model) {
185
+             ->addColumn('number', function($model) {
186 186
                  return $model->number;
187 187
              })
188
-            ->addColumn('products', function ($model) {
188
+            ->addColumn('products', function($model) {
189 189
                 $invoice = $this->invoice->find($model->id);
190 190
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
191 191
 
192 192
                 return ucfirst(implode(',', $products));
193 193
             })
194
-            ->addColumn('date', function ($model) {
194
+            ->addColumn('date', function($model) {
195 195
                 $date = date_create($model->created_at);
196 196
 
197 197
                 return date_format($date, 'M j, Y, g:i a');
198 198
             })
199
-            ->addColumn('total', function ($model) {
199
+            ->addColumn('total', function($model) {
200 200
                 return $model->grand_total;
201 201
             })
202
-            ->addColumn('status', function ($model) {
202
+            ->addColumn('status', function($model) {
203 203
                 return ucfirst($model->status);
204 204
             })
205
-            ->addColumn('action', function ($model) {
205
+            ->addColumn('action', function($model) {
206 206
                 if (\Auth::user()->role == 'admin') {
207 207
                     $url = '/invoices/show?invoiceid='.$model->id;
208 208
                 } else {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
         $productCheck = $orders->product()
37 37
         ->select('github_owner', 'github_repository', 'type')
38 38
         ->where('id', $orders->product)->first();
39
-        if ($permissions['downloadPermission'] == 1) { //If the Product has doownlaod permission
39
+        if ($permissions['downloadPermission'] == 1) {
40
+//If the Product has doownlaod permission
40 41
             if (!$productCheck->github_owner == '' && !$productCheck->github_repository == '') {
41 42
                 $listUrl = $this->downloadGithubPopup($orders->client, $orders->invoice()->first()->id, $productid);
42 43
             } else {
Please login to merge, or discard this patch.
app/Http/Controllers/Product/CategoryController.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,21 +56,21 @@
 block discarded – undo
56 56
             $allCategories = $this->productCategory->select('id', 'category_name')->get();
57 57
 
58 58
             return \DataTables::of($allCategories)
59
-         ->addColumn('checkbox', function ($model) {
60
-             return "<input type='checkbox' class='category_checkbox' 
59
+            ->addColumn('checkbox', function ($model) {
60
+                return "<input type='checkbox' class='category_checkbox' 
61 61
             value=".$model->id.' name=select[] id=check>';
62
-         })
63
-         ->addColumn('category_name', function ($model) {
64
-             return ucfirst($model->category_name);
65
-         })
66
-         ->addColumn('action', function ($model) {
67
-             return "<p><button data-toggle='modal' 
62
+            })
63
+            ->addColumn('category_name', function ($model) {
64
+                return ucfirst($model->category_name);
65
+            })
66
+            ->addColumn('action', function ($model) {
67
+                return "<p><button data-toggle='modal' 
68 68
              data-id=".$model->id." data-name= '$model->category_name' 
69 69
              class='btn btn-sm btn-primary btn-xs editCat'><i class='fa fa-edit'
70 70
              style='color:white;'> </i>&nbsp;&nbsp;Edit</button>&nbsp;</p>";
71
-         })
72
-         ->rawColumns(['checkbox', 'category_name', 'action'])
73
-         ->make(true);
71
+            })
72
+            ->rawColumns(['checkbox', 'category_name', 'action'])
73
+            ->make(true);
74 74
         } catch (\Exception $ex) {
75 75
             return redirect()->back()->with('fails', $ex->getMessage());
76 76
         }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,14 +56,14 @@
 block discarded – undo
56 56
             $allCategories = $this->productCategory->select('id', 'category_name')->get();
57 57
 
58 58
             return \DataTables::of($allCategories)
59
-         ->addColumn('checkbox', function ($model) {
59
+         ->addColumn('checkbox', function($model) {
60 60
              return "<input type='checkbox' class='category_checkbox' 
61 61
             value=".$model->id.' name=select[] id=check>';
62 62
          })
63
-         ->addColumn('category_name', function ($model) {
63
+         ->addColumn('category_name', function($model) {
64 64
              return ucfirst($model->category_name);
65 65
          })
66
-         ->addColumn('action', function ($model) {
66
+         ->addColumn('action', function($model) {
67 67
              return "<p><button data-toggle='modal' 
68 68
              data-id=".$model->id." data-name= '$model->category_name' 
69 69
              class='btn btn-sm btn-primary btn-xs editCat'><i class='fa fa-edit'
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductTypeController.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -34,21 +34,21 @@
 block discarded – undo
34 34
             $allTypes = $this->productType->select('id', 'name')->get();
35 35
 
36 36
             return \DataTables::of($allTypes)
37
-         ->addColumn('checkbox', function ($model) {
38
-             return "<input type='checkbox' class='type_checkbox' 
37
+            ->addColumn('checkbox', function ($model) {
38
+                return "<input type='checkbox' class='type_checkbox' 
39 39
             value=".$model->id.' name=select[] id=check>';
40
-         })
41
-         ->addColumn('type_name', function ($model) {
42
-             return ucfirst($model->name);
43
-         })
44
-         ->addColumn('action', function ($model) {
45
-             return "<p><button data-toggle='modal' 
40
+            })
41
+            ->addColumn('type_name', function ($model) {
42
+                return ucfirst($model->name);
43
+            })
44
+            ->addColumn('action', function ($model) {
45
+                return "<p><button data-toggle='modal' 
46 46
              data-id=".$model->id." data-name= '$model->name' 
47 47
              class='btn btn-sm btn-primary btn-xs editType'><i class='fa fa-edit'
48 48
              style='color:white;'> </i>&nbsp;&nbsp;Edit</button>&nbsp;</p>";
49
-         })
50
-         ->rawColumns(['checkbox', 'type_name', 'action'])
51
-         ->make(true);
49
+            })
50
+            ->rawColumns(['checkbox', 'type_name', 'action'])
51
+            ->make(true);
52 52
         } catch (\Exception $ex) {
53 53
             Bugsnag::notifyException($ex);
54 54
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@
 block discarded – undo
34 34
             $allTypes = $this->productType->select('id', 'name')->get();
35 35
 
36 36
             return \DataTables::of($allTypes)
37
-         ->addColumn('checkbox', function ($model) {
37
+         ->addColumn('checkbox', function($model) {
38 38
              return "<input type='checkbox' class='type_checkbox' 
39 39
             value=".$model->id.' name=select[] id=check>';
40 40
          })
41
-         ->addColumn('type_name', function ($model) {
41
+         ->addColumn('type_name', function($model) {
42 42
              return ucfirst($model->name);
43 43
          })
44
-         ->addColumn('action', function ($model) {
44
+         ->addColumn('action', function($model) {
45 45
              return "<p><button data-toggle='modal' 
46 46
              data-id=".$model->id." data-name= '$model->name' 
47 47
              class='btn btn-sm btn-primary btn-xs editType'><i class='fa fa-edit'
Please login to merge, or discard this patch.
app/Model/Order/Payment.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     protected $table = 'payments';
10 10
     protected $fillable = ['parent_id', 'invoice_id', 'amount',
11
-     'payment_method', 'user_id', 'payment_status', 'created_at', 'amt_to_credit', ];
11
+        'payment_method', 'user_id', 'payment_status', 'created_at', 'amt_to_credit', ];
12 12
 
13 13
     public function invoice()
14 14
     {
Please login to merge, or discard this patch.
app/Http/Controllers/Common/ChatScriptController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
                             value=".$model->id.' name=select[] id=check>';
37 37
                         })
38 38
 
39
-                         ->addColumn('name', function ($model) {
40
-                             return $model->name;
41
-                         })
39
+                            ->addColumn('name', function ($model) {
40
+                                return $model->name;
41
+                            })
42 42
 
43 43
                         ->addColumn('action', function ($model) {
44 44
                             return '<a href='.url('chat/'.$model->id.'/edit').
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@
 block discarded – undo
32 32
     {
33 33
         try {
34 34
             return \DataTables::of($this->script->get())
35
-                        ->addColumn('checkbox', function ($model) {
35
+                        ->addColumn('checkbox', function($model) {
36 36
                             return "<input type='checkbox' class='chat_checkbox' 
37 37
                             value=".$model->id.' name=select[] id=check>';
38 38
                         })
39 39
 
40
-                         ->addColumn('name', function ($model) {
40
+                         ->addColumn('name', function($model) {
41 41
                              return $model->name;
42 42
                          })
43 43
 
44
-                        ->addColumn('action', function ($model) {
44
+                        ->addColumn('action', function($model) {
45 45
                             return '<a href='.url('chat/'.$model->id.'/edit').
46 46
                             " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
47 47
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
48 48
                         })
49
-                        ->rawColumns(['checkbox', 'name',  'action'])
49
+                        ->rawColumns(['checkbox', 'name', 'action'])
50 50
                         ->make(true);
51 51
         } catch (\Exception $ex) {
52 52
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/Order/ExtendedBaseInvoiceController.php 3 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,8 @@  discard block
 block discarded – undo
133 133
     {
134 134
         try {
135 135
             foreach ($invoiceChecked as $key => $value) {
136
-                if ($key != 0) {//If Payment is linked to Invoice
136
+                if ($key != 0) {
137
+//If Payment is linked to Invoice
137 138
                     $invoice = Invoice::find($value);
138 139
                     $invoice_status = 'pending';
139 140
                     $payment = Payment::where('invoice_id', $value)->create([
@@ -157,7 +158,8 @@  discard block
 block discarded – undo
157 158
                         $invoice->status = $invoice_status;
158 159
                         $invoice->save();
159 160
                     }
160
-                } elseif (count($invoiceChecked) == 1 || $amtToCredit > 0) {//If Payment is not linked to any invoice and is to be credited to User Accunt
161
+                } elseif (count($invoiceChecked) == 1 || $amtToCredit > 0) {
162
+//If Payment is not linked to any invoice and is to be credited to User Accunt
161 163
                     $payment = Payment::create([
162 164
                 'invoice_id'     => $value,
163 165
                 'user_id'        => $clientid,
@@ -224,7 +226,8 @@  discard block
 block discarded – undo
224 226
         try {
225 227
             $sum = 0;
226 228
             foreach ($invoiceChecked as $key => $value) {
227
-                if ($key != 0) {//If Payment is linked to Invoice
229
+                if ($key != 0) {
230
+//If Payment is linked to Invoice
228 231
                     $invoice = Invoice::find($value);
229 232
                     Payment::where('user_id', $clientid)->where('invoice_id', 0)->update(['amt_to_credit'=>$amtToCredit]);
230 233
                     $invoice_status = 'pending';
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             $orders = $order->where('client', $clientid)->get();
38 38
 
39 39
             return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices',  'orders',
40
-                  'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
40
+                    'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
41 41
         } catch (Exception $ex) {
42 42
             return redirect()->back()->with('fails', $ex->getMessage());
43 43
         }
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
     public function postNewPayment($clientid, Request $request)
47 47
     {
48 48
         $this->validate($request, [
49
-           'payment_date'  => 'required',
50
-           'payment_method'=> 'required',
51
-           'amount'        => 'required',
49
+            'payment_date'  => 'required',
50
+            'payment_method'=> 'required',
51
+            'amount'        => 'required',
52 52
         ]);
53 53
 
54 54
         try {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $amtToCredit = $request->amtToCredit;
114 114
             $payment_status = 'success';
115 115
             $payment = $this->multiplePayment($clientid,$invoiceChecked, $payment_method,
116
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
116
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
117 117
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
118 118
 
119 119
             return response()->json($response);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     }
131 131
 
132 132
     public function multiplePayment($clientid,$invoiceChecked, $payment_method,
133
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
133
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
134 134
     {
135 135
         try {
136 136
             foreach ($invoiceChecked as $key => $value) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $amtToCredit = $request->amtToCredit;
206 206
             $payment_status = 'success';
207 207
             $payment = $this->updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
208
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
208
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
209 209
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
210 210
 
211 211
             return response()->json($response);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     }
220 220
 
221 221
     public function updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
222
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
222
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
223 223
     {
224 224
         try {
225 225
             $sum = 0;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $symbol = Currency::where('code', $currency)->pluck('symbol')->first();
37 37
             $orders = $order->where('client', $clientid)->get();
38 38
 
39
-            return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices',  'orders',
39
+            return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices', 'orders',
40 40
                   'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
41 41
         } catch (Exception $ex) {
42 42
             return redirect()->back()->with('fails', $ex->getMessage());
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             $invoicAmount = $request->invoiceAmount;
113 113
             $amtToCredit = $request->amtToCredit;
114 114
             $payment_status = 'success';
115
-            $payment = $this->multiplePayment($clientid,$invoiceChecked, $payment_method,
115
+            $payment = $this->multiplePayment($clientid, $invoiceChecked, $payment_method,
116 116
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
117 117
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
118 118
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         }
130 130
     }
131 131
 
132
-    public function multiplePayment($clientid,$invoiceChecked, $payment_method,
132
+    public function multiplePayment($clientid, $invoiceChecked, $payment_method,
133 133
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
134 134
     {
135 135
         try {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             $invoicAmount = $request->invoiceAmount;
205 205
             $amtToCredit = $request->amtToCredit;
206 206
             $payment_status = 'success';
207
-            $payment = $this->updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
207
+            $payment = $this->updatePaymentByInvoice($clientid, $invoiceChecked, $payment_method,
208 208
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
209 209
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
210 210
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         }
219 219
     }
220 220
 
221
-    public function updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
221
+    public function updatePaymentByInvoice($clientid, $invoiceChecked, $payment_method,
222 222
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
223 223
     {
224 224
         try {
Please login to merge, or discard this patch.
app/Http/Controllers/Payment/CurrencyController.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,18 +37,18 @@
 block discarded – undo
37 37
 
38 38
         return \DataTables::of($model)
39 39
 
40
-                        ->addColumn('name', function ($model) {
40
+                        ->addColumn('name', function($model) {
41 41
                             return $model->name;
42 42
                         })
43 43
 
44
-                          ->addColumn('code', function ($model) {
44
+                          ->addColumn('code', function($model) {
45 45
                               return $model->code;
46 46
                           })
47 47
 
48
-                          ->addColumn('symbol', function ($model) {
48
+                          ->addColumn('symbol', function($model) {
49 49
                               return $model->symbol;
50 50
                           })
51
-                        ->addColumn('status', function ($model) {
51
+                        ->addColumn('status', function($model) {
52 52
                             if ($model->status == 1) {
53 53
                                 return'<label class="switch toggle_event_editing">
54 54
                             <input type="hidden" name="module_id" class="module_id" value="'.$model->id.'" >
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
                             return $model->name;
44 44
                         })
45 45
 
46
-                          ->addColumn('code', function ($model) {
47
-                              return $model->code;
48
-                          })
46
+                            ->addColumn('code', function ($model) {
47
+                                return $model->code;
48
+                            })
49 49
 
50
-                          ->addColumn('symbol', function ($model) {
51
-                              return $model->symbol;
52
-                          })
50
+                            ->addColumn('symbol', function ($model) {
51
+                                return $model->symbol;
52
+                            })
53 53
                         ->addColumn('status', function ($model) {
54 54
                             if ($model->status == 1) {
55 55
                                 return'<label class="switch toggle_event_editing">
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     {
241 241
         $countryDetails = Country::where('country_id', $request->id)->select('currency_code', 'currency_symbol', 'currency_name')->first();
242 242
         $data = (['code'=> $countryDetails->currency_code,
243
-          'symbol'      => $countryDetails->currency_symbol, 'currency'=>$countryDetails->currency_name, ]);
243
+            'symbol'      => $countryDetails->currency_symbol, 'currency'=>$countryDetails->currency_name, ]);
244 244
 
245 245
         return $data;
246 246
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Front/WidgetController.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
     public function getPages()
32 32
     {
33 33
         return \DataTables::of($this->widget->get())
34
-                       ->addColumn('checkbox', function ($model) {
35
-                           return "<input type='checkbox' class='widget_checkbox' 
34
+                        ->addColumn('checkbox', function ($model) {
35
+                            return "<input type='checkbox' class='widget_checkbox' 
36 36
                             value=".$model->id.' name=select[] id=check>';
37
-                       })
38
-                          ->addColumn('name', function ($model) {
39
-                              return ucfirst($model->name);
40
-                          })
37
+                        })
38
+                            ->addColumn('name', function ($model) {
39
+                                return ucfirst($model->name);
40
+                            })
41 41
                             ->addColumn('type', function ($model) {
42 42
                                 return $model->type;
43 43
                             })
44
-                              ->addColumn('created_at', function ($model) {
45
-                                  return $model->created_at;
46
-                              })
44
+                                ->addColumn('created_at', function ($model) {
45
+                                    return $model->created_at;
46
+                                })
47 47
                         // ->showColumns('name', 'type', 'created_at')
48 48
                         ->addColumn('content', function ($model) {
49 49
                             return str_limit($model->content, 10, '...');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
     public function getPages()
32 32
     {
33 33
         return \DataTables::of($this->widget->get())
34
-                       ->addColumn('checkbox', function ($model) {
34
+                       ->addColumn('checkbox', function($model) {
35 35
                            return "<input type='checkbox' class='widget_checkbox' 
36 36
                             value=".$model->id.' name=select[] id=check>';
37 37
                        })
38
-                          ->addColumn('name', function ($model) {
38
+                          ->addColumn('name', function($model) {
39 39
                               return ucfirst($model->name);
40 40
                           })
41
-                            ->addColumn('type', function ($model) {
41
+                            ->addColumn('type', function($model) {
42 42
                                 return $model->type;
43 43
                             })
44
-                              ->addColumn('created_at', function ($model) {
44
+                              ->addColumn('created_at', function($model) {
45 45
                                   return $model->created_at;
46 46
                               })
47 47
                         // ->showColumns('name', 'type', 'created_at')
48
-                        ->addColumn('content', function ($model) {
48
+                        ->addColumn('content', function($model) {
49 49
                             return str_limit($model->content, 10, '...');
50 50
                         })
51
-                        ->addColumn('action', function ($model) {
51
+                        ->addColumn('action', function($model) {
52 52
                             return '<a href='.url('widgets/'.$model->id.'/edit')."
53 53
                              class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
54 54
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Common/TemplateController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
131
-                             return $model->name;
132
-                         })
130
+                            ->addColumn('name', function ($model) {
131
+                                return $model->name;
132
+                            })
133 133
                         ->addColumn('type', function ($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     }
274 274
 
275 275
     public function mailing($from, $to, $data, $subject, $replace = [],
276
-     $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
276
+        $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
277 277
     {
278 278
         try {
279 279
             $transform = [];
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
                 'date' => date('Y-m-d H:i:s'),
306 306
             'from'     => $from,
307 307
             'to'       => $to,
308
-             'subject' => $subject,
308
+                'subject' => $subject,
309 309
             'body'     => $data,
310
-          'status'     => 'success',
311
-          ]);
310
+            'status'     => 'success',
311
+            ]);
312 312
 
313 313
             return 'success';
314 314
         } catch (\Exception $ex) {
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             'date'     => date('Y-m-d H:i:s'),
317 317
             'from'     => $from,
318 318
             'to'       => $to,
319
-             'subject' => $subject,
319
+                'subject' => $subject,
320 320
             'body'     => $data,
321 321
             'status'   => 'failed',
322 322
         ]);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,18 +122,18 @@  discard block
 block discarded – undo
122 122
     public function getTemplates()
123 123
     {
124 124
         return \DataTables::of($this->template->select('id', 'name', 'type')->get())
125
-                        ->addColumn('checkbox', function ($model) {
125
+                        ->addColumn('checkbox', function($model) {
126 126
                             return "<input type='checkbox' class='template_checkbox' 
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
130
+                         ->addColumn('name', function($model) {
131 131
                              return $model->name;
132 132
                          })
133
-                        ->addColumn('type', function ($model) {
133
+                        ->addColumn('type', function($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
136
-                        ->addColumn('action', function ($model) {
136
+                        ->addColumn('action', function($model) {
137 137
                             return '<a href='.url('templates/'.$model->id.'/edit').
138 138
                             " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
139 139
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             
285 285
             $settings = \App\Model\Common\Setting::find(1);
286 286
             $fromname = $settings->company;
287
-            \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
287
+            \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
288 288
                 $m->from($from, $fromname);
289 289
 
290 290
                 $m->to($to, $toname)->subject($subject);
Please login to merge, or discard this patch.