Completed
Branch feature-dynamic-fields (3b03cc)
by Ashutosh
09:05
created
app/Http/Controllers/Product/GroupController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 
53 53
         // return \Datatable::of($this->group->select('id', 'name')->get())
54 54
 
55
-                        ->editColumn('#', function ($model) {
55
+                        ->editColumn('#', function($model) {
56 56
                             return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
57 57
                         })
58 58
                         // ->showColumns('name')
59
-                        ->editColumn('features', function ($model) {
59
+                        ->editColumn('features', function($model) {
60 60
                             $features = $this->feature->select('features')->where('group_id', $model->id)->get();
61 61
                             //dd($features);
62 62
                             $result = [];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                             //dd($result);
68 68
                             return implode(',', $result);
69 69
                         })
70
-                        ->addColumn('action', function ($model) {
70
+                        ->addColumn('action', function($model) {
71 71
                             return '<a href='.url('groups/'.$model->id.'/edit').
72 72
                             " class='btn btn-sm btn-primary'>Edit</a>";
73 73
                         })
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                             return '<a href='.url('groups/'.$model->id.'/edit').
73 73
                             " class='btn btn-sm btn-primary'>Edit</a>";
74 74
                         })
75
-                      ->rawColumns(['name', 'features', 'action'])
75
+                        ->rawColumns(['name', 'features', 'action'])
76 76
                         ->make(true);
77 77
     }
78 78
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'pricing_templates_id' => 'required',
107 107
             ], [
108 108
                 'pricing_templates_id.required'=> 'Please Select a Template',
109
-          ]);
109
+            ]);
110 110
 
111 111
         try {
112 112
             $this->group->fill($request->input())->save();
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ServiceController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
     public function getServices()
36 36
     {
37 37
         return \Datatable::collection($this->service->get())
38
-                        ->addColumn('#', function ($model) {
38
+                        ->addColumn('#', function($model) {
39 39
                             return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
40 40
                         })
41 41
                         ->showColumns('name')
42
-                        ->addColumn('plan', function ($model) {
42
+                        ->addColumn('plan', function($model) {
43 43
                             //return $this->product->plan()->name;
44 44
                         })
45
-                        ->addColumn('action', function ($model) {
45
+                        ->addColumn('action', function($model) {
46 46
                             return '<a href='.url('products/'.$model->id.'/edit')
47 47
                             ." class='btn btn-sm btn-primary'>Edit</a>";
48 48
                         })
Please login to merge, or discard this patch.
app/Model/Common/State.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
         'state_subdivision_id', 'country_code_char2',
14 14
         'country_code_char3', 'state_subdivision_name',
15 15
         'state_subdivision_alternate_names', 'primary_level_name',
16
-         'state_subdivision_code',
16
+            'state_subdivision_code',
17 17
     ];
18 18
 }
Please login to merge, or discard this patch.
app/Console/Commands/Install.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             $dbpassword = $this->ask('Enter your database password (blank if not entered)', false);
49 49
             $port = $this->ask('Enter your sql port (blank if not entered)', false);
50 50
             $array = ['DB_TYPE' => $default, 'DB_HOST' => $host,
51
-             'DB_DATABASE'      => $database, 'DB_USERNAME' => $dbusername, 'DB_PASSWORD' => $dbpassword, ];
51
+                'DB_DATABASE'      => $database, 'DB_USERNAME' => $dbusername, 'DB_PASSWORD' => $dbpassword, ];
52 52
             $this->updateDBEnv($array);
53 53
             $this->call('key:generate');
54 54
             $this->call('migrate');
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SocialMediaController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,20 +35,20 @@
 block discarded – undo
35 35
             $social = $this->social->get();
36 36
 
37 37
             return \DataTables::of($social)
38
-                            ->addColumn('#', function ($model) {
38
+                            ->addColumn('#', function($model) {
39 39
                                 return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
40 40
                             })
41
-                            ->addColumn('name', function ($model) {
41
+                            ->addColumn('name', function($model) {
42 42
                                 return $model->name;
43 43
                             })
44
-                            ->addColumn('class', function ($model) {
44
+                            ->addColumn('class', function($model) {
45 45
                                 return $model->class;
46 46
                             })
47
-                            ->addColumn('link', function ($model) {
47
+                            ->addColumn('link', function($model) {
48 48
                                 return $model->link;
49 49
                             })
50 50
                             // ->showColumns('name', 'class', 'link')
51
-                            ->addColumn('action', function ($model) {
51
+                            ->addColumn('action', function($model) {
52 52
                                 return '<a href='.url('social-media/'.$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/Order/TaxRatesAndCodeExpiryController.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@
 block discarded – undo
271 271
                 return redirect()->back()->with('fails', 'Can not delete');
272 272
             }
273 273
 
274
-            return redirect()->back()->with('success', "Invoice $invoice->number has been Deleted Successfully");
274
+            return redirect()->back()->with('success', "invoice $invoice->number has been Deleted Successfully");
275 275
         } catch (\Exception $e) {
276 276
             Bugsnag::notifyException($e);
277 277
 
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                         '<td style="border-bottom: 1px solid#ccc; color: #333; 
187 187
                         font-family: Arial,sans-serif; font-size: 14px; line-height: 20px;
188 188
                          padding: 15px 8px;" valign="top">'.$this->currency($invoiceid).' '
189
-                         .$item->subtotal.'</td>'.
189
+                            .$item->subtotal.'</td>'.
190 190
                         '</tr>';
191 191
             }
192 192
         }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
             return view('themes.default1.invoice.editPayment',
288 288
                 compact('amountReceived','clientid', 'client', 'invoices',  'orders',
289
-                  'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
289
+                    'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
290 290
         } catch (\Exception $e) {
291 291
             Bugsnag::notifyException($e);
292 292
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@
 block discarded – undo
285 285
             $orders = $order->where('client', $clientid)->get();
286 286
 
287 287
             return view('themes.default1.invoice.editPayment',
288
-                compact('amountReceived','clientid', 'client', 'invoices',  'orders',
288
+                compact('amountReceived', 'clientid', 'client', 'invoices', 'orders',
289 289
                   'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
290 290
         } catch (\Exception $e) {
291 291
             Bugsnag::notifyException($e);
Please login to merge, or discard this patch.
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.