Completed
Push — development ( 138ffb...1fce93 )
by Ashutosh
09:58
created
app/Http/Controllers/DashboardController.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         if (!empty($products)) {
47 47
            
48 48
             foreach ($products as $product) {
49
-                 if($product && $product->name){
49
+                    if($product && $product->name){
50 50
                     $productName[] = $product->name;
51 51
                 
52 52
                 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
         return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD',
59 59
                 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users',
60 60
 
61
-                 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
62
-                 'products', 'arrayCountList'));
61
+                    'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
62
+                    'products', 'arrayCountList'));
63 63
     }
64 64
 
65 65
     /**
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
     public function getAllUsers()
162 162
     {
163 163
         $allUsers = User::orderBy('created_at', 'desc')->where('active', 1)->where('mobile_verified', 1)
164
-              ->take(20)
165
-              ->get()
166
-              ->toArray();
164
+                ->take(20)
165
+                ->get()
166
+                ->toArray();
167 167
 
168 168
         return $allUsers;
169 169
     }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      *
174 174
      * @return type
175 175
      */
176
- public function recentProductSold()
176
+    public function recentProductSold()
177 177
     {
178 178
         try{
179 179
         $dayUtc = new Carbon('-30 days');
@@ -186,9 +186,9 @@  discard block
 block discarded – undo
186 186
 
187 187
         return $product;
188 188
     }catch(Exception $ex )
189
-     {
189
+        {
190 190
         return redirect()->back()->with('fails', $ex->getMessage());
191
-     }
191
+        }
192 192
     }
193 193
     /**
194 194
      * List of orders of past 30 days.
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $dayUtc = new Carbon('-30 days');
199 199
         $minus30Day = $dayUtc->toDateTimeString();
200 200
         $recentOrders = Order::where('created_at', '>', $minus30Day)->orderBy('created_at', 'desc')
201
-                 ->where('price_override', '>', 0)->get();
201
+                    ->where('price_override', '>', 0)->get();
202 202
 
203 203
         return $recentOrders;
204 204
     }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         
32 32
         if (count($productSoldlists) > 0) {
33 33
             foreach ($productSoldlists as $productSoldlist) {
34
-                if($productSoldlist && $productSoldlist->name){
34
+                if ($productSoldlist && $productSoldlist->name) {
35 35
                     $productNameList[] = $productSoldlist->name;
36 36
                 }
37 37
                 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         if (!empty($products)) {
47 47
            
48 48
             foreach ($products as $product) {
49
-                 if($product && $product->name){
49
+                 if ($product && $product->name) {
50 50
                     $productName[] = $product->name;
51 51
                 
52 52
                 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD',
59 59
                 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users',
60 60
 
61
-                 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
61
+                 'count_users', 'arraylists', 'productSoldlists', 'orders', 'subscriptions', 'invoices',
62 62
                  'products', 'arrayCountList'));
63 63
     }
64 64
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
  public function recentProductSold()
177 177
     {
178
-        try{
178
+        try {
179 179
         $dayUtc = new Carbon('-30 days');
180 180
         $minus30Day = $dayUtc->toDateTimeString();
181 181
         $product = [];
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         }
186 186
 
187 187
         return $product;
188
-    }catch(Exception $ex )
188
+    } catch (Exception $ex)
189 189
      {
190 190
         return redirect()->back()->with('fails', $ex->getMessage());
191 191
      }
Please login to merge, or discard this patch.
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         
32 32
         if (count($productSoldlists) > 0) {
33 33
             foreach ($productSoldlists as $productSoldlist) {
34
-                if($productSoldlist && $productSoldlist->name){
34
+                if($productSoldlist && $productSoldlist->name) {
35 35
                     $productNameList[] = $productSoldlist->name;
36 36
                 }
37 37
                 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         if (!empty($products)) {
47 47
            
48 48
             foreach ($products as $product) {
49
-                 if($product && $product->name){
49
+                 if($product && $product->name) {
50 50
                     $productName[] = $product->name;
51 51
                 
52 52
                 
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
      * @return type
175 175
      */
176 176
  public function recentProductSold()
177
-    {
178
-        try{
177
+ {
178
+        try {
179 179
         $dayUtc = new Carbon('-30 days');
180 180
         $minus30Day = $dayUtc->toDateTimeString();
181 181
         $product = [];
@@ -185,8 +185,7 @@  discard block
 block discarded – undo
185 185
         }
186 186
 
187 187
         return $product;
188
-    }catch(Exception $ex )
189
-     {
188
+    } catch(Exception $ex ) {
190 189
         return redirect()->back()->with('fails', $ex->getMessage());
191 190
      }
192 191
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseTemplateController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
     public function getResult($country, $geoip_country, $state, $geoip_state,
56
-     $shop, $cart, $cart1, $shop1, $rate, $product, $price)
56
+        $shop, $cart, $cart1, $shop1, $rate, $product, $price)
57 57
     {
58 58
         if ($country == $geoip_country || $state == $geoip_state || ($country == '' && $state == '')) {
59 59
             $result = $this->getCartResult($product, $shop, $cart, $rate, $price, $cart1, $shop1);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 }
170 170
                 $tax_amount = $this->ifStatement($rate, $price, $cart, $shop, $tax->country, $tax->state);
171 171
             }
172
-              // dd($tax_amount);
172
+                // dd($tax_amount);
173 173
             return $tax_amount;
174 174
         } catch (\Exception $ex) {
175 175
             Bugsnag::notifyException($ex);
Please login to merge, or discard this patch.
app/Http/Controllers/Front/BaseClientController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 $user->profile_pic = $fileName;
115 115
             }
116 116
             $user->fill($request->input())->save();
117
-            $response = ['type' => 'success',  'message' =>'Updated Successfully..'];
117
+            $response = ['type' => 'success', 'message' =>'Updated Successfully..'];
118 118
 
119 119
             return $response;
120 120
         } catch (Exception $ex) {
@@ -168,31 +168,31 @@  discard block
 block discarded – undo
168 168
             }
169 169
 
170 170
             return \DataTables::of($invoices->get())
171
-            ->addColumn('checkbox', function ($model) {
171
+            ->addColumn('checkbox', function($model) {
172 172
                             return "<input type='checkbox' class='transaction_checkbox' 
173 173
                             value=".$model->id.' name=select[] id=checks>';
174 174
                         })
175
-            ->addColumn('number', function ($model) {
175
+            ->addColumn('number', function($model) {
176 176
                 return $model->number;
177 177
             })
178
-            ->addColumn('products', function ($model) {
178
+            ->addColumn('products', function($model) {
179 179
                 $invoice = $this->invoice->find($model->id);
180 180
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
181 181
 
182 182
                 return ucfirst(implode(',', $products));
183 183
             })
184
-            ->addColumn('date', function ($model) {
184
+            ->addColumn('date', function($model) {
185 185
                 $date = date_create($model->created_at);
186 186
 
187 187
                 return date_format($date, 'M j, Y, g:i a');
188 188
             })
189
-            ->addColumn('total', function ($model) {
189
+            ->addColumn('total', function($model) {
190 190
                 return $model->grand_total;
191 191
             })
192
-            ->addColumn('status', function ($model) {
192
+            ->addColumn('status', function($model) {
193 193
                 return ucfirst($model->status);
194 194
             })
195
-            ->addColumn('action', function ($model) {
195
+            ->addColumn('action', function($model) {
196 196
                 if (\Auth::user()->role == 'admin') {
197 197
                     $url = '/invoices/show?invoiceid='.$model->id;
198 198
                 } else {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                 class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
204 204
                 style='color:white;'> </i>&nbsp;&nbsp;View</a>";
205 205
             })
206
-                            ->rawColumns(['checkbox','number', 'products', 'date', 'total', 'status', 'action'])
206
+                            ->rawColumns(['checkbox', 'number', 'products', 'date', 'total', 'status', 'action'])
207 207
                             ->make(true);
208 208
         } catch (Exception $ex) {
209 209
             Bugsnag::notifyException($ex);
Please login to merge, or discard this patch.