Completed
Push — development ( ff0ab6...d6912b )
by Bhanu
20:01 queued 09:34
created
app/Http/Controllers/Product/ExtendedBaseProductController.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,28 +19,28 @@
 block discarded – undo
19 19
         ->get();
20 20
 
21 21
         return \DataTables::of($new_upload)
22
-        ->addColumn('checkbox', function ($model) {
22
+        ->addColumn('checkbox', function($model) {
23 23
             return "<input type='checkbox' class='upload_checkbox' value=".$model->id.' name=select[] id=checks>';
24 24
         })
25 25
 
26
-        ->addColumn('product_id', function ($model) {
26
+        ->addColumn('product_id', function($model) {
27 27
             return ucfirst($this->product->where('id', $model->product_id)->first()->name);
28 28
         })
29 29
 
30
-        ->addColumn('title', function ($model) {
30
+        ->addColumn('title', function($model) {
31 31
             return ucfirst($model->title);
32 32
         })
33
-        ->addColumn('description', function ($model) {
33
+        ->addColumn('description', function($model) {
34 34
             return ucfirst($model->description);
35 35
         })
36
-        ->addColumn('version', function ($model) {
36
+        ->addColumn('version', function($model) {
37 37
             return $model->version;
38 38
         })
39 39
 
40
-        ->addColumn('file', function ($model) {
40
+        ->addColumn('file', function($model) {
41 41
             return $model->file;
42 42
         })
43
-        ->addColumn('action', function ($model) {
43
+        ->addColumn('action', function($model) {
44 44
             return '<a href='.('#edit-upload-option/'.$model->id).' 
45 45
          class=" btn btn-sm btn-primary " data-title="'.$model->title.'"
46 46
           data-description="'.$model->description.'" data-version="'
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@
 block discarded – undo
62 62
             $file_upload = ProductUpload::find($id);
63 63
             $file_upload->update(['title'=>$request->input('producttitle'), 'description'=>$request->input('description'), 'version'=> $request->input('version')]);
64 64
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
65
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the AutoUpdate Script
65
+            if ($autoUpdateStatus == 1) {
66
+//If License Setting Status is on,Add Product to the AutoUpdate Script
66 67
                 $productSku = $file_upload->product->product_sku;
67 68
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
68 69
                 $addProductToAutoUpdate = $updateClassObj->editVersion($request->input('version'), $productSku);
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,10 +120,10 @@
 block discarded – undo
120 120
                             ->addColumn('name', function ($model) {
121 121
                                 return ucfirst($model->name);
122 122
                             })
123
-                              ->addColumn('image', function ($model) {
124
-                                  // return $model->image;
125
-                                  return "<img src= '$model->image' + height=\"80\"/>";
126
-                              })
123
+                                ->addColumn('image', function ($model) {
124
+                                    // return $model->image;
125
+                                    return "<img src= '$model->image' + height=\"80\"/>";
126
+                                })
127 127
                             ->addColumn('type', function ($model) {
128 128
                                 if ($this->type->where('id', $model->type)->first()) {
129 129
                                     return $this->type->where('id', $model->type)->first()->name;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -118,18 +118,18 @@  discard block
 block discarded – undo
118 118
 
119 119
             return\ DataTables::of($new_product)
120 120
 
121
-                            ->addColumn('checkbox', function ($model) {
121
+                            ->addColumn('checkbox', function($model) {
122 122
                                 return "<input type='checkbox' class='product_checkbox' 
123 123
                                 value=".$model->id.' name=select[] id=check>';
124 124
                             })
125
-                            ->addColumn('name', function ($model) {
125
+                            ->addColumn('name', function($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
128
+                              ->addColumn('image', function($model) {
129 129
                                   // return $model->image;
130 130
                                   return "<img src= '$model->image' + height=\"80\"/>";
131 131
                               })
132
-                            ->addColumn('type', function ($model) {
132
+                            ->addColumn('type', function($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
135 135
                                 } else {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                                 }
138 138
                             })
139 139
 
140
-                            ->addColumn('group', function ($model) {
140
+                            ->addColumn('group', function($model) {
141 141
                                 if ($this->group->where('id', $model->group)->first()) {
142 142
                                     return $this->group->where('id', $model->group)->first()->name;
143 143
                                 } else {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                                 }
146 146
                             })
147 147
 
148
-                            ->addColumn('Action', function ($model) {
148
+                            ->addColumn('Action', function($model) {
149 149
                                 $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
150 150
                                 $url = '';
151 151
                                 if ($permissions['downloadPermission'] == 1) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     // Save file Info in Modal popup
172 172
     public function save(Request $request)
173 173
     {
174
-        $this->validate($request,[
174
+        $this->validate($request, [
175 175
         'producttitle' => 'required',
176 176
         'version'      => 'required',
177 177
         'filename'     => 'required',
Please login to merge, or discard this patch.
app/Http/Controllers/Front/PageController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,30 +49,30 @@  discard block
 block discarded – undo
49 49
     public function getPages()
50 50
     {
51 51
         return \DataTables::of($this->page->get())
52
-                        ->addColumn('checkbox', function ($model) {
52
+                        ->addColumn('checkbox', function($model) {
53 53
                             return "<input type='checkbox' class='page_checkbox' 
54 54
                             value=".$model->id.' name=select[] id=check>';
55 55
                         })
56
-                        ->addColumn('name', function ($model) {
56
+                        ->addColumn('name', function($model) {
57 57
                             return ucfirst($model->name);
58 58
                         })
59
-                        ->addColumn('url', function ($model) {
59
+                        ->addColumn('url', function($model) {
60 60
                             return $model->url;
61 61
                         })
62
-                        ->addColumn('created_at', function ($model) {
62
+                        ->addColumn('created_at', function($model) {
63 63
                             return $model->created_at;
64 64
                         })
65 65
 
66
-                        ->addColumn('content', function ($model) {
66
+                        ->addColumn('content', function($model) {
67 67
                             return str_limit($model->content, 10, '...');
68 68
                         })
69
-                        ->addColumn('action', function ($model) {
69
+                        ->addColumn('action', function($model) {
70 70
                             return '<a href='.url('pages/'.$model->id.'/edit')
71 71
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
72 72
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
73 73
                         })
74 74
 
75
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
75
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'content', 'action'])
76 76
                         ->make(true);
77 77
         // ->searchColumns('name', 'content')
78 78
                         // ->orderColumns('name')
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
105 105
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
106 106
 
107
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
107
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
108 108
                 'parentName'));
109 109
         } catch (\Exception $ex) {
110 110
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ExtendedBaseCartController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,18 +135,21 @@
 block discarded – undo
135 135
             if ($this->checkPlanSession() === true) {
136 136
                 $planid = Session::get('plan');
137 137
             }
138
-            if (!$planid) {//When Product Is Added from Cart
138
+            if (!$planid) {
139
+//When Product Is Added from Cart
139 140
                 $planid = Plan::where('product', $productid)->pluck('id')->first();
140 141
             }
141 142
             $plan = Plan::where('id', $planid)->where('product', $productid)->first();
142
-            if ($plan) { //Get the Total Plan Cost if the Plan Exists For a Product
143
+            if ($plan) {
144
+//Get the Total Plan Cost if the Plan Exists For a Product
143 145
                 $months = 1;
144 146
                 $cont = new CartController();
145 147
                 $currency = $cont->currency($userid);
146 148
                 $product = Product::find($productid);
147 149
                 $days = $plan->periods->pluck('days')->first();
148 150
                 $price = ($product->planRelation->find($planid)->planPrice->where('currency', $currency['currency'])->first()->add_price);
149
-                if ($days) { //If Period Is defined for a Particular Plan ie no. of Days Generated
151
+                if ($days) {
152
+//If Period Is defined for a Particular Plan ie no. of Days Generated
150 153
                     $months = $days >= '365' ? $days / 30 / 12 : $days / 30;
151 154
                 }
152 155
                 $finalPrice = str_replace(',', '', $price);
Please login to merge, or discard this patch.