@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | //dd($this->invoice->get()); |
| 48 | 48 | return \Datatable::collection($this->subscription->get()) |
| 49 | 49 | |
| 50 | - ->addColumn('user_id', function ($model) { |
|
| 50 | + ->addColumn('user_id', function($model) { |
|
| 51 | 51 | $user = $model->user()->first(); |
| 52 | 52 | $first = $user->first_name; |
| 53 | 53 | $last = $user->last_name; |
@@ -55,18 +55,18 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 57 | 57 | }) |
| 58 | - ->addColumn('plan_id', function ($model) { |
|
| 58 | + ->addColumn('plan_id', function($model) { |
|
| 59 | 59 | $name = $this->plan->where('id', $model->plan_id)->first()->name; |
| 60 | 60 | |
| 61 | 61 | return $name; |
| 62 | 62 | }) |
| 63 | - ->addColumn('order_id', function ($model) { |
|
| 63 | + ->addColumn('order_id', function($model) { |
|
| 64 | 64 | $name = $this->order->where('id', $model->order_id)->first()->id; |
| 65 | 65 | |
| 66 | 66 | return $name; |
| 67 | 67 | }) |
| 68 | 68 | ->showColumns('ends_at') |
| 69 | - ->addColumn('action', function ($model) { |
|
| 69 | + ->addColumn('action', function($model) { |
|
| 70 | 70 | return '<a href='.url('subscriptions/'.$model->id)." |
| 71 | 71 | class='btn btn-sm btn-primary'>View</a>"; |
| 72 | 72 | }) |
@@ -475,7 +475,8 @@ discard block |
||
| 475 | 475 | if ($this->tax_option->findOrFail(1)->inclusive == 0) { |
| 476 | 476 | if ($this->tax_option->findOrFail(1)->tax_enable == 1) { |
| 477 | 477 | $taxs = $this->getTaxWhenEnable($productid, $taxs[0], $userid); |
| 478 | - } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0 |
|
| 478 | + } elseif ($this->tax_option->tax_enable == 0) { |
|
| 479 | +//if tax_enable is 0 |
|
| 479 | 480 | |
| 480 | 481 | $taxClassId = Tax::where('country', '')->where('state', 'Any State') |
| 481 | 482 | ->pluck('tax_classes_id')->first(); //In case of India when |
@@ -484,13 +485,15 @@ discard block |
||
| 484 | 485 | $rate = $this->getTotalRate($taxClassId, $productid, $taxs); |
| 485 | 486 | $taxs = $rate['taxes']; |
| 486 | 487 | $rate = $rate['rate']; |
| 487 | - } elseif ($geoip_country != 'IN') {//In case of other country |
|
| 488 | + } elseif ($geoip_country != 'IN') { |
|
| 489 | +//In case of other country |
|
| 488 | 490 | // when tax is available and tax is not enabled(Applicable |
| 489 | 491 | //when Global Tax class for any country and state is not there) |
| 490 | 492 | |
| 491 | 493 | $taxClassId = Tax::where('state', $geoip_state) |
| 492 | 494 | ->orWhere('country', $geoip_country)->pluck('tax_classes_id')->first(); |
| 493 | - if ($taxClassId) { //if state equals the user State |
|
| 495 | + if ($taxClassId) { |
|
| 496 | +//if state equals the user State |
|
| 494 | 497 | $rate = $this->getTotalRate($taxClassId, $productid, $taxs); |
| 495 | 498 | $taxs = $rate['taxes']; |
| 496 | 499 | $rate = $rate['rate']; |
@@ -533,11 +536,13 @@ discard block |
||
| 533 | 536 | $i_gst = 0; |
| 534 | 537 | $ut_gst = 0; |
| 535 | 538 | $state_code = ''; |
| 536 | - if ($user_state != '') {//Get the CGST,SGST,IGST,STATE_CODE of the user |
|
| 539 | + if ($user_state != '') { |
|
| 540 | +//Get the CGST,SGST,IGST,STATE_CODE of the user |
|
| 537 | 541 | $tax = $this->getTaxWhenState($user_state, $productid, $origin_state); |
| 538 | 542 | $taxes = $tax['taxes']; |
| 539 | 543 | $value = $tax['value']; |
| 540 | - } else {//If user from other Country |
|
| 544 | + } else { |
|
| 545 | +//If user from other Country |
|
| 541 | 546 | $tax = $this->getTaxWhenOtherCountry($geoip_state, $geoip_country, $productid); |
| 542 | 547 | $taxes = $tax['taxes']; |
| 543 | 548 | $value = $tax['value']; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $from = $request->input('from'); |
| 105 | 105 | $till = $request->input('till'); |
| 106 | 106 | |
| 107 | - return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from', |
|
| 107 | + return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from', |
|
| 108 | 108 | |
| 109 | 109 | 'till')); |
| 110 | 110 | } catch (\Exception $ex) { |
@@ -127,35 +127,35 @@ discard block |
||
| 127 | 127 | return \DataTables::of($query->take(100)) |
| 128 | 128 | ->setTotalRecords($query->count()) |
| 129 | 129 | |
| 130 | - ->addColumn('checkbox', function ($model) { |
|
| 130 | + ->addColumn('checkbox', function($model) { |
|
| 131 | 131 | return "<input type='checkbox' class='invoice_checkbox' |
| 132 | 132 | value=".$model->id.' name=select[] id=check>'; |
| 133 | 133 | }) |
| 134 | - ->addColumn('user_id', function ($model) { |
|
| 134 | + ->addColumn('user_id', function($model) { |
|
| 135 | 135 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 136 | 136 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
| 137 | 137 | $id = $this->user->where('id', $model->user_id)->first()->id; |
| 138 | 138 | |
| 139 | 139 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 140 | 140 | }) |
| 141 | - ->addColumn('number', function ($model) { |
|
| 141 | + ->addColumn('number', function($model) { |
|
| 142 | 142 | return ucfirst($model->number); |
| 143 | 143 | }) |
| 144 | 144 | |
| 145 | - ->addColumn('date', function ($model) { |
|
| 145 | + ->addColumn('date', function($model) { |
|
| 146 | 146 | $date = ($model->created_at); |
| 147 | 147 | |
| 148 | 148 | return $date; |
| 149 | 149 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
| 150 | 150 | }) |
| 151 | - ->addColumn('grand_total', function ($model) { |
|
| 151 | + ->addColumn('grand_total', function($model) { |
|
| 152 | 152 | return ucfirst($model->number); |
| 153 | 153 | }) |
| 154 | - ->addColumn('status', function ($model) { |
|
| 154 | + ->addColumn('status', function($model) { |
|
| 155 | 155 | return ucfirst($model->status); |
| 156 | 156 | }) |
| 157 | 157 | |
| 158 | - ->addColumn('action', function ($model) { |
|
| 158 | + ->addColumn('action', function($model) { |
|
| 159 | 159 | $action = ''; |
| 160 | 160 | |
| 161 | 161 | $check = $this->checkExecution($model->id); |
@@ -171,25 +171,25 @@ discard block |
||
| 171 | 171 | style='color:white;'> </i> View</a>" |
| 172 | 172 | ." $action"; |
| 173 | 173 | }) |
| 174 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
| 174 | + ->filterColumn('user_id', function($query, $keyword) { |
|
| 175 | 175 | $sql = 'first_name like ?'; |
| 176 | 176 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 177 | 177 | }) |
| 178 | 178 | |
| 179 | - ->filterColumn('status', function ($query, $keyword) { |
|
| 179 | + ->filterColumn('status', function($query, $keyword) { |
|
| 180 | 180 | $sql = 'status like ?'; |
| 181 | 181 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 182 | 182 | }) |
| 183 | 183 | |
| 184 | - ->filterColumn('number', function ($query, $keyword) { |
|
| 184 | + ->filterColumn('number', function($query, $keyword) { |
|
| 185 | 185 | $sql = 'number like ?'; |
| 186 | 186 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 187 | 187 | }) |
| 188 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 188 | + ->filterColumn('grand_total', function($query, $keyword) { |
|
| 189 | 189 | $sql = 'grand_total like ?'; |
| 190 | 190 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 191 | 191 | }) |
| 192 | - ->filterColumn('date', function ($query, $keyword) { |
|
| 192 | + ->filterColumn('date', function($query, $keyword) { |
|
| 193 | 193 | $sql = 'date like ?'; |
| 194 | 194 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 195 | 195 | }) |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at'); |
| 235 | 235 | |
| 236 | 236 | $join = $join->orderBy('created_at', 'desc') |
| 237 | - ->select('invoices.id','first_name','invoices.created_at', |
|
| 237 | + ->select('invoices.id', 'first_name', 'invoices.created_at', |
|
| 238 | 238 | 'invoices.currency', 'user_id', 'number', 'status'); |
| 239 | 239 | |
| 240 | 240 | return $join; |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till); |
| 126 | 126 | |
| 127 | 127 | return \DataTables::of($query->take(100)) |
| 128 | - ->setTotalRecords($query->count()) |
|
| 128 | + ->setTotalRecords($query->count()) |
|
| 129 | 129 | |
| 130 | - ->addColumn('checkbox', function ($model) { |
|
| 131 | - return "<input type='checkbox' class='invoice_checkbox' |
|
| 130 | + ->addColumn('checkbox', function ($model) { |
|
| 131 | + return "<input type='checkbox' class='invoice_checkbox' |
|
| 132 | 132 | value=".$model->id.' name=select[] id=check>'; |
| 133 | - }) |
|
| 133 | + }) |
|
| 134 | 134 | ->addColumn('user_id', function ($model) { |
| 135 | 135 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 136 | 136 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
@@ -138,9 +138,9 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 140 | 140 | }) |
| 141 | - ->addColumn('number', function ($model) { |
|
| 142 | - return ucfirst($model->number); |
|
| 143 | - }) |
|
| 141 | + ->addColumn('number', function ($model) { |
|
| 142 | + return ucfirst($model->number); |
|
| 143 | + }) |
|
| 144 | 144 | |
| 145 | 145 | ->addColumn('date', function ($model) { |
| 146 | 146 | $date = ($model->created_at); |
@@ -148,12 +148,12 @@ discard block |
||
| 148 | 148 | return $date; |
| 149 | 149 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
| 150 | 150 | }) |
| 151 | - ->addColumn('grand_total', function ($model) { |
|
| 152 | - return ucfirst($model->number); |
|
| 153 | - }) |
|
| 154 | - ->addColumn('status', function ($model) { |
|
| 155 | - return ucfirst($model->status); |
|
| 156 | - }) |
|
| 151 | + ->addColumn('grand_total', function ($model) { |
|
| 152 | + return ucfirst($model->number); |
|
| 153 | + }) |
|
| 154 | + ->addColumn('status', function ($model) { |
|
| 155 | + return ucfirst($model->status); |
|
| 156 | + }) |
|
| 157 | 157 | |
| 158 | 158 | ->addColumn('action', function ($model) { |
| 159 | 159 | $action = ''; |
@@ -171,30 +171,30 @@ discard block |
||
| 171 | 171 | style='color:white;'> </i> View</a>" |
| 172 | 172 | ." $action"; |
| 173 | 173 | }) |
| 174 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
| 175 | - $sql = 'first_name like ?'; |
|
| 176 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 177 | - }) |
|
| 174 | + ->filterColumn('user_id', function ($query, $keyword) { |
|
| 175 | + $sql = 'first_name like ?'; |
|
| 176 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 177 | + }) |
|
| 178 | 178 | |
| 179 | - ->filterColumn('status', function ($query, $keyword) { |
|
| 180 | - $sql = 'status like ?'; |
|
| 181 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 182 | - }) |
|
| 179 | + ->filterColumn('status', function ($query, $keyword) { |
|
| 180 | + $sql = 'status like ?'; |
|
| 181 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 182 | + }) |
|
| 183 | 183 | |
| 184 | 184 | ->filterColumn('number', function ($query, $keyword) { |
| 185 | 185 | $sql = 'number like ?'; |
| 186 | 186 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 187 | 187 | }) |
| 188 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 189 | - $sql = 'grand_total like ?'; |
|
| 190 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 191 | - }) |
|
| 192 | - ->filterColumn('date', function ($query, $keyword) { |
|
| 193 | - $sql = 'date like ?'; |
|
| 194 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 195 | - }) |
|
| 196 | - |
|
| 197 | - ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
| 188 | + ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 189 | + $sql = 'grand_total like ?'; |
|
| 190 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 191 | + }) |
|
| 192 | + ->filterColumn('date', function ($query, $keyword) { |
|
| 193 | + $sql = 'date like ?'; |
|
| 194 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 195 | + }) |
|
| 196 | + |
|
| 197 | + ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
| 198 | 198 | ->make(true); |
| 199 | 199 | } |
| 200 | 200 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at'); |
| 235 | 235 | |
| 236 | 236 | $join = $join->orderBy('created_at', 'desc') |
| 237 | - ->select('invoices.id','first_name','invoices.created_at', |
|
| 237 | + ->select('invoices.id','first_name','invoices.created_at', |
|
| 238 | 238 | 'invoices.currency', 'user_id', 'number', 'status'); |
| 239 | 239 | |
| 240 | 240 | return $join; |
@@ -424,8 +424,8 @@ discard block |
||
| 424 | 424 | $symbol = $attributes[0]['currency'][0]['code']; |
| 425 | 425 | //dd($symbol); |
| 426 | 426 | $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number, |
| 427 | - 'date' => $date, 'grand_total' => $grand_total, 'status' => 'pending', |
|
| 428 | - 'currency' => $symbol, ]); |
|
| 427 | + 'date' => $date, 'grand_total' => $grand_total, 'status' => 'pending', |
|
| 428 | + 'currency' => $symbol, ]); |
|
| 429 | 429 | |
| 430 | 430 | foreach (\Cart::getContent() as $cart) { |
| 431 | 431 | $this->createInvoiceItems($invoice->id, $cart); |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | 'currency' => $currency, 'status' => 'pending', 'description' => $description, ]); |
| 531 | 531 | |
| 532 | 532 | $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid, |
| 533 | - $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate); |
|
| 533 | + $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate); |
|
| 534 | 534 | $result = $this->getMessage($items, $user_id); |
| 535 | 535 | } catch (\Exception $ex) { |
| 536 | 536 | dd($ex); |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0 |
| 683 | 683 | |
| 684 | 684 | $taxClassId = Tax::where('country', '')->where('state', 'Any State') |
| 685 | - ->pluck('tax_classes_id')->first(); //In case of India when |
|
| 685 | + ->pluck('tax_classes_id')->first(); //In case of India when |
|
| 686 | 686 | //other tax is available and tax is not enabled |
| 687 | 687 | if ($taxClassId) { |
| 688 | 688 | $rate = $this->getTotalRate($taxClassId, $productid, $taxs); |
@@ -750,10 +750,10 @@ discard block |
||
| 750 | 750 | foreach ($taxes as $key => $tax) { |
| 751 | 751 | if ($taxes[0]) { |
| 752 | 752 | $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1, |
| 753 | - 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
| 754 | - 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
| 755 | - 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
| 756 | - 'origin_state' => $origin_state, ]; |
|
| 753 | + 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
| 754 | + 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
| 755 | + 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
| 756 | + 'origin_state' => $origin_state, ]; |
|
| 757 | 757 | |
| 758 | 758 | $rate = $tax->rate; |
| 759 | 759 | |
@@ -963,8 +963,8 @@ discard block |
||
| 963 | 963 | } |
| 964 | 964 | |
| 965 | 965 | return view('themes.default1.invoice.payment', |
| 966 | - compact('invoice_status', 'payment_status', |
|
| 967 | - 'payment_method', 'invoice_id', 'domain', 'invoice', 'userid')); |
|
| 966 | + compact('invoice_status', 'payment_status', |
|
| 967 | + 'payment_method', 'invoice_id', 'domain', 'invoice', 'userid')); |
|
| 968 | 968 | } |
| 969 | 969 | |
| 970 | 970 | return redirect()->back(); |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | case 1: |
| 1004 | 1004 | $percentage = $price * ($value / 100); |
| 1005 | 1005 | |
| 1006 | - return $price - $percentage; |
|
| 1006 | + return $price - $percentage; |
|
| 1007 | 1007 | case 2: |
| 1008 | 1008 | return $price - $value; |
| 1009 | 1009 | case 3: |
@@ -1035,7 +1035,7 @@ discard block |
||
| 1035 | 1035 | $payment_date = \Carbon\Carbon::now()->toDateTimeString(); |
| 1036 | 1036 | $amount = $grand_total; |
| 1037 | 1037 | $paymentRenewal = $this->updateInvoicePayment($invoiceid, $payment_method, |
| 1038 | - $payment_status, $payment_date, $amount); |
|
| 1038 | + $payment_status, $payment_date, $amount); |
|
| 1039 | 1039 | |
| 1040 | 1040 | return redirect()->back()->with('success', 'Payment Accepted Successfully'); |
| 1041 | 1041 | } catch (\Exception $ex) { |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | return \Datatable::collection($this->bundle->select('id', 'name', |
| 50 | 50 | 'valid_from', 'valid_till', 'uses', 'maximum_uses')->get()) |
| 51 | - ->addColumn('#', function ($model) { |
|
| 51 | + ->addColumn('#', function($model) { |
|
| 52 | 52 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 53 | 53 | }) |
| 54 | 54 | ->showColumns('name', 'valid_from', 'valid_till', 'uses', 'maximum_uses') |
| 55 | - ->addColumn('item', function ($model) { |
|
| 55 | + ->addColumn('item', function($model) { |
|
| 56 | 56 | $name = $this->relation->where('bundle_id', $model->id)->pluck('product_id'); |
| 57 | 57 | //dd($name); |
| 58 | 58 | $result = []; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | //dd($result); |
| 63 | 63 | return implode(',', $result); |
| 64 | 64 | }) |
| 65 | - ->addColumn('action', function ($model) { |
|
| 65 | + ->addColumn('action', function($model) { |
|
| 66 | 66 | return '<a href='.url('bundles/'.$model->id.'/edit'). |
| 67 | 67 | " class='btn btn-sm btn-primary'>Edit</a>"; |
| 68 | 68 | }) |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function getBundles() |
| 48 | 48 | { |
| 49 | 49 | return \Datatable::collection($this->bundle->select('id', 'name', |
| 50 | - 'valid_from', 'valid_till', 'uses', 'maximum_uses')->get()) |
|
| 50 | + 'valid_from', 'valid_till', 'uses', 'maximum_uses')->get()) |
|
| 51 | 51 | ->addColumn('#', function ($model) { |
| 52 | 52 | return "<input type='checkbox' value=".$model->id.' name=select[] id=check>'; |
| 53 | 53 | }) |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | return view('themes.default1.product.bundle.edit', |
| 151 | - compact('products', 'bundle', 'relation', 'till', 'from')); |
|
| 151 | + compact('products', 'bundle', 'relation', 'till', 'from')); |
|
| 152 | 152 | } catch (\Exception $e) { |
| 153 | 153 | return redirect()->back()->with('fails', $e->getMessage()); |
| 154 | 154 | } catch (\InvalidArgumentException $e) { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $from = null; |
| 158 | 158 | |
| 159 | 159 | return view('themes.default1.product.bundle.edit', |
| 160 | - compact('products', 'bundle', 'relation', 'till', 'from')); |
|
| 160 | + compact('products', 'bundle', 'relation', 'till', 'from')); |
|
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | return '<a href='.url('groups/'.$model->id.'/edit'). |
| 72 | 72 | " class='btn btn-sm btn-primary'>Edit</a>"; |
| 73 | 73 | }) |
| 74 | - ->rawColumns(['name', 'features', 'action']) |
|
| 74 | + ->rawColumns(['name', 'features', 'action']) |
|
| 75 | 75 | ->make(true); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -52,11 +52,11 @@ discard block |
||
| 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 |
||
| 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 | }) |
@@ -35,14 +35,14 @@ |
||
| 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 | }) |
@@ -18,28 +18,28 @@ |
||
| 18 | 18 | ->get(); |
| 19 | 19 | |
| 20 | 20 | return \DataTables::of($new_upload) |
| 21 | - ->addColumn('checkbox', function ($model) { |
|
| 21 | + ->addColumn('checkbox', function($model) { |
|
| 22 | 22 | return "<input type='checkbox' class='upload_checkbox' value=".$model->id.' name=select[] id=checks>'; |
| 23 | 23 | }) |
| 24 | 24 | |
| 25 | - ->addColumn('product_id', function ($model) { |
|
| 25 | + ->addColumn('product_id', function($model) { |
|
| 26 | 26 | return ucfirst($this->product->where('id', $model->product_id)->first()->name); |
| 27 | 27 | }) |
| 28 | 28 | |
| 29 | - ->addColumn('title', function ($model) { |
|
| 29 | + ->addColumn('title', function($model) { |
|
| 30 | 30 | return ucfirst($model->title); |
| 31 | 31 | }) |
| 32 | - ->addColumn('description', function ($model) { |
|
| 32 | + ->addColumn('description', function($model) { |
|
| 33 | 33 | return ucfirst($model->description); |
| 34 | 34 | }) |
| 35 | - ->addColumn('version', function ($model) { |
|
| 35 | + ->addColumn('version', function($model) { |
|
| 36 | 36 | return $model->version; |
| 37 | 37 | }) |
| 38 | 38 | |
| 39 | - ->addColumn('file', function ($model) { |
|
| 39 | + ->addColumn('file', function($model) { |
|
| 40 | 40 | return $model->file; |
| 41 | 41 | }) |
| 42 | - ->addColumn('action', function ($model) { |
|
| 42 | + ->addColumn('action', function($model) { |
|
| 43 | 43 | return '<a href='.('#edit-upload-option/'.$model->id).' |
| 44 | 44 | class=" btn btn-sm btn-primary " data-title="'.$model->title.'" |
| 45 | 45 | data-description="'.$model->description.'" data-version="' |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return '<a href='.('#edit-upload-option/'.$model->id).' |
| 43 | 43 | class=" btn btn-sm btn-primary " data-title="'.$model->title.'" |
| 44 | 44 | data-description="'.$model->description.'" data-version="' |
| 45 | - .$model->version.'" data-id="'.$model->id.'" onclick="openEditPopup(this)" >Edit</a>'; |
|
| 45 | + .$model->version.'" data-id="'.$model->id.'" onclick="openEditPopup(this)" >Edit</a>'; |
|
| 46 | 46 | }) |
| 47 | 47 | ->rawcolumns(['checkbox', 'product_id', 'title', 'description', 'version', 'file', 'action']) |
| 48 | 48 | ->make(true); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | if ($product->require_domain == 1) { |
| 93 | 93 | $field .= "<div class='col-md-4 form-group'> |
| 94 | 94 | <label class='required'>"./* @scrutinizer ignore-type */ |
| 95 | - \Lang::get('message.domain')."</label> |
|
| 95 | + \Lang::get('message.domain')."</label> |
|
| 96 | 96 | <input type='text' name='domain' class='form-control' |
| 97 | 97 | id='domain' placeholder='http://example.com'> |
| 98 | 98 | </div>"; |
@@ -13,6 +13,6 @@ |
||
| 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 | } |
@@ -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, $domain); |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | // $faveo_encrypted_key = self::decryptByFaveoPrivateKey($request->input('serial_key')); |
| 349 | 349 | // $faveo_encrypted_domain = self::decryptByFaveoPrivateKey($request->input('domain')); |
| 350 | 350 | $this_order = $order |
| 351 | - ->where('number', $faveo_encrypted_order_number) |
|
| 351 | + ->where('number', $faveo_encrypted_order_number) |
|
| 352 | 352 | // ->where('number', $request->input('order_number')) |
| 353 | 353 | //->where('serial_key', $faveo_encrypted_key) |
| 354 | 354 | //->where('domain', $faveo_encrypted_domain) |
@@ -48,7 +48,7 @@ |
||
| 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'); |