@@ -59,17 +59,17 @@ discard block |
||
| 59 | 59 | $new_promotion = $this->promotion->select('code', 'type', 'id')->get(); |
| 60 | 60 | |
| 61 | 61 | return\ DataTables::of($new_promotion) |
| 62 | - ->addColumn('checkbox', function ($model) { |
|
| 62 | + ->addColumn('checkbox', function($model) { |
|
| 63 | 63 | return "<input type='checkbox' class='promotion_checkbox' |
| 64 | 64 | value=".$model->id.' name=select[] id=check>'; |
| 65 | 65 | }) |
| 66 | - ->addColumn('code', function ($model) { |
|
| 66 | + ->addColumn('code', function($model) { |
|
| 67 | 67 | return ucfirst($model->code); |
| 68 | 68 | }) |
| 69 | - ->addColumn('type', function ($model) { |
|
| 69 | + ->addColumn('type', function($model) { |
|
| 70 | 70 | return $this->type->where('id', $model->type)->first()->name; |
| 71 | 71 | }) |
| 72 | - ->addColumn('products', function ($model) { |
|
| 72 | + ->addColumn('products', function($model) { |
|
| 73 | 73 | $selected = $this->promoRelation->select('product_id') |
| 74 | 74 | ->where('promotion_id', $model->id)->get(); |
| 75 | 75 | $result = []; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | return 'None'; |
| 83 | 83 | } |
| 84 | 84 | }) |
| 85 | - ->addColumn('action', function ($model) { |
|
| 85 | + ->addColumn('action', function($model) { |
|
| 86 | 86 | return '<a href='.url('promotions/'.$model->id.'/edit') |
| 87 | 87 | ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' |
| 88 | 88 | style='color:white;'> </i> Edit</a>"; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' |
| 88 | 88 | style='color:white;'> </i> Edit</a>"; |
| 89 | 89 | }) |
| 90 | - ->rawColumns(['checkbox', 'code', 'products', 'action']) |
|
| 90 | + ->rawColumns(['checkbox', 'code', 'products', 'action']) |
|
| 91 | 91 | |
| 92 | 92 | ->make(true); |
| 93 | 93 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | ->pluck('product_id', 'product_id')->toArray(); |
| 150 | 150 | |
| 151 | 151 | return view('themes.default1.payment.promotion.edit', |
| 152 | - compact('product', 'promotion', 'selectedProduct', 'type')); |
|
| 152 | + compact('product', 'promotion', 'selectedProduct', 'type')); |
|
| 153 | 153 | } catch (\Exception $ex) { |
| 154 | 154 | return redirect()->back()->with('fails', $ex->getMessage()); |
| 155 | 155 | } |
@@ -255,12 +255,12 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | $userId = \Auth::user()->id; |
| 257 | 257 | \Cart::update($productid, [ |
| 258 | - 'id' => $productid, |
|
| 259 | - 'price' => $value, |
|
| 260 | - 'conditions' => $coupon, |
|
| 258 | + 'id' => $productid, |
|
| 259 | + 'price' => $value, |
|
| 260 | + 'conditions' => $coupon, |
|
| 261 | 261 | |
| 262 | - // new item price, price can also be a string format like so: '98.67' |
|
| 263 | - ]); |
|
| 262 | + // new item price, price can also be a string format like so: '98.67' |
|
| 263 | + ]); |
|
| 264 | 264 | $items = \Cart::getContent(); |
| 265 | 265 | \Session::put('items', $items); |
| 266 | 266 | |
@@ -168,9 +168,9 @@ |
||
| 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(); |
@@ -201,27 +201,27 @@ |
||
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | return \DataTables::of($invoices->get()) |
| 204 | - ->addColumn('number', function ($model) { |
|
| 204 | + ->addColumn('number', function($model) { |
|
| 205 | 205 | return $model->number; |
| 206 | 206 | }) |
| 207 | - ->addColumn('products', function ($model) { |
|
| 207 | + ->addColumn('products', function($model) { |
|
| 208 | 208 | $invoice = $this->invoice->find($model->id); |
| 209 | 209 | $products = $invoice->invoiceItem()->pluck('product_name')->toArray(); |
| 210 | 210 | |
| 211 | 211 | return ucfirst(implode(',', $products)); |
| 212 | 212 | }) |
| 213 | - ->addColumn('date', function ($model) { |
|
| 213 | + ->addColumn('date', function($model) { |
|
| 214 | 214 | $date = date_create($model->created_at); |
| 215 | 215 | |
| 216 | 216 | return date_format($date, 'M j, Y, g:i a'); |
| 217 | 217 | }) |
| 218 | - ->addColumn('total', function ($model) { |
|
| 218 | + ->addColumn('total', function($model) { |
|
| 219 | 219 | return currency_format($model->grand_total, $code = $model->currency); |
| 220 | 220 | }) |
| 221 | - ->addColumn('status', function ($model) { |
|
| 221 | + ->addColumn('status', function($model) { |
|
| 222 | 222 | return ucfirst($model->status); |
| 223 | 223 | }) |
| 224 | - ->addColumn('action', function ($model) { |
|
| 224 | + ->addColumn('action', function($model) { |
|
| 225 | 225 | if (\Auth::user()->role == 'admin') { |
| 226 | 226 | $url = '/invoices/show?invoiceid='.$model->id; |
| 227 | 227 | } else { |
@@ -122,18 +122,18 @@ discard block |
||
| 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> Edit</a>"; |
@@ -284,7 +284,7 @@ discard block |
||
| 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); |
@@ -80,7 +80,8 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function checkoutForm(Request $request) |
| 82 | 82 | { |
| 83 | - if (!\Auth::user()) {//If User is not Logged in then send him to login Page |
|
| 83 | + if (!\Auth::user()) { |
|
| 84 | +//If User is not Logged in then send him to login Page |
|
| 84 | 85 | $url = $request->segments(); //The requested url (chekout).Save it in Session |
| 85 | 86 | \Session::put('session-url', $url[0]); |
| 86 | 87 | $content = Cart::getContent(); |
@@ -106,7 +107,8 @@ discard block |
||
| 106 | 107 | |
| 107 | 108 | try { |
| 108 | 109 | $domain = $request->input('domain'); |
| 109 | - if ($domain) {//Store the Domain in session when user Logged In |
|
| 110 | + if ($domain) { |
|
| 111 | +//Store the Domain in session when user Logged In |
|
| 110 | 112 | foreach ($domain as $key => $value) { |
| 111 | 113 | \Session::put('domain'.$key, $value); |
| 112 | 114 | } |
@@ -131,7 +133,8 @@ discard block |
||
| 131 | 133 | public function getAttributes($content) |
| 132 | 134 | { |
| 133 | 135 | try { |
| 134 | - if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared |
|
| 136 | + if (count($content) > 0) { |
|
| 137 | +//after ProductPurchase this is not true as cart is cleared |
|
| 135 | 138 | foreach ($content as $key => $item) { |
| 136 | 139 | $attributes[] = $item->attributes; |
| 137 | 140 | $cart_currency = $attributes[0]['currency']['currency']; //Get the currency of Product in the cart |
@@ -275,7 +275,7 @@ |
||
| 275 | 275 | $data = $template->data; |
| 276 | 276 | $replace = [ |
| 277 | 277 | 'name' => $user->first_name.' '.$user->last_name, |
| 278 | - 'serialkeyurl' => $myaccounturl, |
|
| 278 | + 'serialkeyurl' => $myaccounturl, |
|
| 279 | 279 | 'downloadurl' => $downloadurl, |
| 280 | 280 | 'invoiceurl' => $invoiceurl, |
| 281 | 281 | 'product' => $product, |
@@ -114,18 +114,18 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | return\ DataTables::of($new_product) |
| 116 | 116 | |
| 117 | - ->addColumn('checkbox', function ($model) { |
|
| 117 | + ->addColumn('checkbox', function($model) { |
|
| 118 | 118 | return "<input type='checkbox' class='product_checkbox' |
| 119 | 119 | value=".$model->id.' name=select[] id=check>'; |
| 120 | 120 | }) |
| 121 | - ->addColumn('name', function ($model) { |
|
| 121 | + ->addColumn('name', function($model) { |
|
| 122 | 122 | return ucfirst($model->name); |
| 123 | 123 | }) |
| 124 | - ->addColumn('image', function ($model) { |
|
| 124 | + ->addColumn('image', function($model) { |
|
| 125 | 125 | // return $model->image; |
| 126 | 126 | return "<img src= '$model->image' + height=\"80\"/>"; |
| 127 | 127 | }) |
| 128 | - ->addColumn('type', function ($model) { |
|
| 128 | + ->addColumn('type', function($model) { |
|
| 129 | 129 | if ($this->type->where('id', $model->type)->first()) { |
| 130 | 130 | return $this->type->where('id', $model->type)->first()->name; |
| 131 | 131 | } else { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | }) |
| 135 | 135 | |
| 136 | - ->addColumn('group', function ($model) { |
|
| 136 | + ->addColumn('group', function($model) { |
|
| 137 | 137 | if ($this->group->where('id', $model->group)->first()) { |
| 138 | 138 | return $this->group->where('id', $model->group)->first()->name; |
| 139 | 139 | } else { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | }) |
| 143 | 143 | |
| 144 | - ->addColumn('Action', function ($model) { |
|
| 144 | + ->addColumn('Action', function($model) { |
|
| 145 | 145 | $permissions = LicensePermissionsController::getPermissionsForProduct($model->id); |
| 146 | 146 | $url = ''; |
| 147 | 147 | if ($permissions['downloadPermission'] == 1) { |
@@ -125,10 +125,10 @@ discard block |
||
| 125 | 125 | ->addColumn('name', function ($model) { |
| 126 | 126 | return ucfirst($model->name); |
| 127 | 127 | }) |
| 128 | - ->addColumn('image', function ($model) { |
|
| 129 | - // return $model->image; |
|
| 130 | - return "<img src= '$model->image' + height=\"80\"/>"; |
|
| 131 | - }) |
|
| 128 | + ->addColumn('image', function ($model) { |
|
| 129 | + // return $model->image; |
|
| 130 | + return "<img src= '$model->image' + height=\"80\"/>"; |
|
| 131 | + }) |
|
| 132 | 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; |
@@ -174,9 +174,9 @@ discard block |
||
| 174 | 174 | $this->validate($request, [ |
| 175 | 175 | 'producttitle' => 'required', |
| 176 | 176 | 'version' => 'required', |
| 177 | - 'filename' => 'required', |
|
| 178 | - ], |
|
| 179 | - ['filename.required' => 'Please Uplaod A file', |
|
| 177 | + 'filename' => 'required', |
|
| 178 | + ], |
|
| 179 | + ['filename.required' => 'Please Uplaod A file', |
|
| 180 | 180 | ]); |
| 181 | 181 | |
| 182 | 182 | try { |
@@ -190,7 +190,8 @@ discard block |
||
| 190 | 190 | $this->product_upload->save(); |
| 191 | 191 | $this->product->where('id', $product_id->id)->update(['version'=>$request->input('version')]); |
| 192 | 192 | $autoUpdateStatus = StatusSetting::pluck('update_settings')->first(); |
| 193 | - if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager |
|
| 193 | + if ($autoUpdateStatus == 1) { |
|
| 194 | +//If License Setting Status is on,Add Product to the License Manager |
|
| 194 | 195 | $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController(); |
| 195 | 196 | $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'), $request->input('filename'), '1'); |
| 196 | 197 | } |
@@ -280,7 +281,8 @@ discard block |
||
| 280 | 281 | |
| 281 | 282 | try { |
| 282 | 283 | $licenseStatus = StatusSetting::pluck('license_status')->first(); |
| 283 | - if ($licenseStatus == 1) { //If License Setting Status is on,Add Product to the License Manager |
|
| 284 | + if ($licenseStatus == 1) { |
|
| 285 | +//If License Setting Status is on,Add Product to the License Manager |
|
| 284 | 286 | $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']); |
| 285 | 287 | } |
| 286 | 288 | $licenseCont = new \App\Http\Controllers\AutoUpdate\AutoUpdateController(); |
@@ -44,7 +44,7 @@ discard block |
||
| 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="' |
| 47 | - .$model->version.'" data-id="'.$model->id.'" data-file="'.$model->file.'"onclick="openEditPopup(this)" >Edit</a>'; |
|
| 47 | + .$model->version.'" data-id="'.$model->id.'" data-file="'.$model->file.'"onclick="openEditPopup(this)" >Edit</a>'; |
|
| 48 | 48 | }) |
| 49 | 49 | ->rawcolumns(['checkbox', 'product_id', 'title', 'description', 'version', 'file', 'action']) |
| 50 | 50 | ->make(true); |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | if ($product->require_domain == 1) { |
| 104 | 104 | $field .= "<div class='col-md-4 form-group'> |
| 105 | 105 | <label class='required'>"./* @scrutinizer ignore-type */ |
| 106 | - \Lang::get('message.domain')."</label> |
|
| 106 | + \Lang::get('message.domain')."</label> |
|
| 107 | 107 | <input type='text' name='domain' class='form-control' |
| 108 | 108 | id='domain' placeholder='http://example.com'> |
| 109 | 109 | </div>"; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $serial_key = $this->checkSerialKey($faveo_encrypted_key, $order_number); |
| 96 | 96 | |
| 97 | 97 | \Log::emergency(json_encode(['domain' => $request->input('domain'), |
| 98 | - 'serial' => $serial_key, 'order' => $order_number, ])); |
|
| 98 | + 'serial' => $serial_key, 'order' => $order_number, ])); |
|
| 99 | 99 | $result = []; |
| 100 | 100 | if ($request_type == 'install') { |
| 101 | 101 | $result = $this->verificationResult($order_number, $serial_key); |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | ->value('serial_key'); |
| 350 | 350 | |
| 351 | 351 | $this_order = $order |
| 352 | - ->where('number', $faveo_encrypted_order_number) |
|
| 352 | + ->where('number', $faveo_encrypted_order_number) |
|
| 353 | 353 | ->first(); |
| 354 | 354 | if ($this_order && $orderSerialKey == $faveo_serial_key) { |
| 355 | 355 | $product_id = $this_order->product; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $from = $request->input('from'); |
| 109 | 109 | $till = $request->input('till'); |
| 110 | 110 | |
| 111 | - return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from', |
|
| 111 | + return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from', |
|
| 112 | 112 | |
| 113 | 113 | 'till')); |
| 114 | 114 | } catch (\Exception $ex) { |
@@ -131,35 +131,35 @@ discard block |
||
| 131 | 131 | return \DataTables::of($query->take(100)) |
| 132 | 132 | ->setTotalRecords($query->count()) |
| 133 | 133 | |
| 134 | - ->addColumn('checkbox', function ($model) { |
|
| 134 | + ->addColumn('checkbox', function($model) { |
|
| 135 | 135 | return "<input type='checkbox' class='invoice_checkbox' |
| 136 | 136 | value=".$model->id.' name=select[] id=check>'; |
| 137 | 137 | }) |
| 138 | - ->addColumn('user_id', function ($model) { |
|
| 138 | + ->addColumn('user_id', function($model) { |
|
| 139 | 139 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 140 | 140 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
| 141 | 141 | $id = $this->user->where('id', $model->user_id)->first()->id; |
| 142 | 142 | |
| 143 | 143 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 144 | 144 | }) |
| 145 | - ->addColumn('number', function ($model) { |
|
| 145 | + ->addColumn('number', function($model) { |
|
| 146 | 146 | return ucfirst($model->number); |
| 147 | 147 | }) |
| 148 | 148 | |
| 149 | - ->addColumn('date', function ($model) { |
|
| 149 | + ->addColumn('date', function($model) { |
|
| 150 | 150 | $date = ($model->created_at); |
| 151 | 151 | |
| 152 | 152 | return $date; |
| 153 | 153 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
| 154 | 154 | }) |
| 155 | - ->addColumn('grand_total', function ($model) { |
|
| 155 | + ->addColumn('grand_total', function($model) { |
|
| 156 | 156 | return $model->grand_total; |
| 157 | 157 | }) |
| 158 | - ->addColumn('status', function ($model) { |
|
| 158 | + ->addColumn('status', function($model) { |
|
| 159 | 159 | return ucfirst($model->status); |
| 160 | 160 | }) |
| 161 | 161 | |
| 162 | - ->addColumn('action', function ($model) { |
|
| 162 | + ->addColumn('action', function($model) { |
|
| 163 | 163 | $action = ''; |
| 164 | 164 | |
| 165 | 165 | $check = $this->checkExecution($model->id); |
@@ -175,25 +175,25 @@ discard block |
||
| 175 | 175 | style='color:white;'> </i> View</a>" |
| 176 | 176 | ." $action"; |
| 177 | 177 | }) |
| 178 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
| 178 | + ->filterColumn('user_id', function($query, $keyword) { |
|
| 179 | 179 | $sql = 'first_name like ?'; |
| 180 | 180 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 181 | 181 | }) |
| 182 | 182 | |
| 183 | - ->filterColumn('status', function ($query, $keyword) { |
|
| 183 | + ->filterColumn('status', function($query, $keyword) { |
|
| 184 | 184 | $sql = 'status like ?'; |
| 185 | 185 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 186 | 186 | }) |
| 187 | 187 | |
| 188 | - ->filterColumn('number', function ($query, $keyword) { |
|
| 188 | + ->filterColumn('number', function($query, $keyword) { |
|
| 189 | 189 | $sql = 'number like ?'; |
| 190 | 190 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 191 | 191 | }) |
| 192 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 192 | + ->filterColumn('grand_total', function($query, $keyword) { |
|
| 193 | 193 | $sql = 'grand_total like ?'; |
| 194 | 194 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 195 | 195 | }) |
| 196 | - ->filterColumn('date', function ($query, $keyword) { |
|
| 196 | + ->filterColumn('date', function($query, $keyword) { |
|
| 197 | 197 | $sql = 'date like ?'; |
| 198 | 198 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 199 | 199 | }) |