diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index 88a6788482..1198a47dab 100755 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -207,18 +207,18 @@ public function retryOTP(Request $request) case 'voice': $array = json_decode($result, true); $response = ['type' => 'success', - 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; + 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; break; default: $array = json_decode($result, true); $response = ['type' => 'success', - 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; + 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; break; - + } - return response()->json($response); + return response()->json($response); } catch (\Exception $ex) { $result = [$ex->getMessage()]; diff --git a/app/Http/Controllers/Auth/BaseAuthController.php b/app/Http/Controllers/Auth/BaseAuthController.php index 021c0e3561..3b1bb18b5f 100644 --- a/app/Http/Controllers/Auth/BaseAuthController.php +++ b/app/Http/Controllers/Auth/BaseAuthController.php @@ -52,9 +52,9 @@ public static function sendOtp($mobile, $code) { $client = new \GuzzleHttp\Client(); $number = $code.$mobile; - $key = ApiKey::where('id', 1)->select('msg91_auth_key','msg91_sender')->first(); + $key = ApiKey::where('id', 1)->select('msg91_auth_key', 'msg91_sender')->first(); $response = $client->request('GET', 'https://control.msg91.com/api/sendotp.php', [ - 'query' => ['authkey' => $key->msg91_auth_key, 'mobile' => $number,'sender'=>$key->msg91_sender], + 'query' => ['authkey' => $key->msg91_auth_key, 'mobile' => $number, 'sender'=>$key->msg91_sender], ]); $send = $response->getBody()->getContents(); $array = json_decode($send, true); @@ -74,7 +74,7 @@ public function sendForReOtp($mobile, $code, $type) $number = $code.$mobile; $key = ApiKey::where('id', 1)->value('msg91_auth_key'); $response = $client->request('GET', 'https://control.msg91.com/api/retryotp.php', [ - 'query' => ['authkey' => $key, 'mobile' => $number,'retrytype'=>$type], + 'query' => ['authkey' => $key, 'mobile' => $number, 'retrytype'=>$type], ]); $send = $response->getBody()->getContents(); $array = json_decode($send, true); diff --git a/app/Http/Controllers/AutoUpdate/AutoUpdateController.php b/app/Http/Controllers/AutoUpdate/AutoUpdateController.php index 90f428f184..e3b3d61f97 100644 --- a/app/Http/Controllers/AutoUpdate/AutoUpdateController.php +++ b/app/Http/Controllers/AutoUpdate/AutoUpdateController.php @@ -47,8 +47,6 @@ public function addNewProductToAUS($product_name, $product_sku) $addProduct = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=products_add&product_title=$product_name&product_sku=$product_sku&product_key=$key&product_status=1"); } - - /* * Add New Version */ diff --git a/app/Http/Controllers/Common/SettingsController.php b/app/Http/Controllers/Common/SettingsController.php index 8fd22a2fd7..8a9893aa66 100755 --- a/app/Http/Controllers/Common/SettingsController.php +++ b/app/Http/Controllers/Common/SettingsController.php @@ -84,7 +84,7 @@ public function getKeys(ApiKey $apikeys) $pipedriveStatus = StatusSetting::pluck('pipedrive_status')->first(); $model = $apikeys->find(1); - return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey','msg91Sender', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl', 'pipedriveKey', 'pipedriveStatus')); + return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey', 'msg91Sender', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl', 'pipedriveKey', 'pipedriveStatus')); } catch (\Exception $ex) { return redirect('/')->with('fails', $ex->getMessage()); } diff --git a/app/Http/Controllers/Front/CartController.php b/app/Http/Controllers/Front/CartController.php index 4abc663356..e3721b4771 100755 --- a/app/Http/Controllers/Front/CartController.php +++ b/app/Http/Controllers/Front/CartController.php @@ -105,6 +105,7 @@ public function cart(Request $request) $items = $this->addProduct($id); \Cart::add($items); //Add Items To the Cart Collection } + return redirect('show/cart'); } catch (\Exception $ex) { app('log')->error($ex->getMessage()); diff --git a/app/Http/Controllers/License/LicenseController.php b/app/Http/Controllers/License/LicenseController.php index 94ce7e471f..8c87bd9abb 100644 --- a/app/Http/Controllers/License/LicenseController.php +++ b/app/Http/Controllers/License/LicenseController.php @@ -101,7 +101,7 @@ public function deleteProductFromAPL($product) $url = $this->url; $api_key_secret = $this->api_key_secret; $productId = $this->searchProductId($product->product_sku); - $productTitle = $product->name; + $productTitle = $product->name; $productSku = $product->sku; $delProduct = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=products_edit &product_id=$productId&product_title=$productTitle&product_sku=$productSku&product_status=1&delete_record=1"); diff --git a/app/Http/Controllers/Order/ExtendedBaseInvoiceController.php b/app/Http/Controllers/Order/ExtendedBaseInvoiceController.php index 0e286d9a35..c9dc362969 100644 --- a/app/Http/Controllers/Order/ExtendedBaseInvoiceController.php +++ b/app/Http/Controllers/Order/ExtendedBaseInvoiceController.php @@ -74,7 +74,7 @@ public function edit($invoiceid, Request $request) $totalSum = array_sum($payment); } - return view('themes.default1.invoice.editInvoice', compact('userid','date','invoiceid', 'invoice', 'totalSum')); + return view('themes.default1.invoice.editInvoice', compact('userid', 'date', 'invoiceid', 'invoice', 'totalSum')); } public function postEdit($invoiceid, Request $request) @@ -89,8 +89,8 @@ public function postEdit($invoiceid, Request $request) $total = $request->input('total'); $status = $request->input('status'); $paid = $request->input('paid'); - $invoice = Invoice::where('id', $invoiceid)->update(['grand_total'=>$total, 'status'=>$status, - 'date'=>\Carbon\Carbon::parse($request->input('date'))]); + $invoice = Invoice::where('id', $invoiceid)->update(['grand_total'=> $total, 'status'=>$status, + 'date' => \Carbon\Carbon::parse($request->input('date')), ]); $order = Order::where('invoice_id', $invoiceid)->update(['price_override'=>$total]); return redirect()->back()->with('success', \Lang::get('message.updated-successfully')); diff --git a/app/Http/Controllers/Order/InvoiceController.php b/app/Http/Controllers/Order/InvoiceController.php index dd5682c53e..dc98629415 100755 --- a/app/Http/Controllers/Order/InvoiceController.php +++ b/app/Http/Controllers/Order/InvoiceController.php @@ -360,7 +360,7 @@ public function createInvoiceItems($invoiceid, $cart, $codevalue = '') public function invoiceGenerateByForm(Request $request, $user_id = '') { - $this->validate($request, [ + $this->validate($request, [ 'date' => 'required', 'domain' => 'sometimes|nullable|regex:/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/i', 'plan' => 'required_if:subscription,true', @@ -495,7 +495,7 @@ public function checkTax($productid, $userid) if ($this->tax_option->findOrFail(1)->tax_enable == 1) { $taxs = $this->getTaxWhenEnable($productid, $taxs[0], $userid); } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0 - + $taxClassId = Tax::where('country', '')->where('state', 'Any State') ->pluck('tax_classes_id')->first(); //In case of India when //other tax is available and tax is not enabled @@ -506,7 +506,6 @@ public function checkTax($productid, $userid) } elseif ($geoip_country != 'IN') {//In case of other country // when tax is available and tax is not enabled(Applicable //when Global Tax class for any country and state is not there) - $taxClassId = Tax::where('state', $geoip_state) ->orWhere('country', $geoip_country)->pluck('tax_classes_id')->first(); diff --git a/app/Http/Controllers/Product/ProductController.php b/app/Http/Controllers/Product/ProductController.php index 0317384c24..476a134fa1 100755 --- a/app/Http/Controllers/Product/ProductController.php +++ b/app/Http/Controllers/Product/ProductController.php @@ -4,7 +4,6 @@ // use Illuminate\Http\Request; use App\Http\Controllers\License\LicenseController; - use App\Http\Controllers\AutoUpdate\AutoUpdateController; use App\Http\Controllers\License\LicensePermissionsController; use App\Model\Common\Setting; use App\Model\Common\StatusSetting; @@ -419,7 +418,7 @@ public function update($id, Request $request) $licenseStatus = StatusSetting::pluck('license_status')->first(); if ($licenseStatus == 1) { $addProductInLicensing = $this->licensing->editProduct($input['name'], $input['product_sku']); - } + } $product = $this->product->where('id', $id)->first(); if ($request->hasFile('image')) { $image = $request->file('image')->getClientOriginalName(); @@ -473,7 +472,7 @@ public function destroy(Request $request) $product = $this->product->where('id', $id)->first(); if ($product) { $licenseStatus = StatusSetting::pluck('license_status')->first(); - if($licenseStatus ==1) { + if ($licenseStatus == 1) { $this->licensing->deleteProductFromAPL($product); } $product->delete(); diff --git a/app/Http/Controllers/User/ClientController.php b/app/Http/Controllers/User/ClientController.php index 994540bf3d..8fa37e8957 100755 --- a/app/Http/Controllers/User/ClientController.php +++ b/app/Http/Controllers/User/ClientController.php @@ -293,6 +293,7 @@ public function show($id) $currency = $client->currency; $orders = $order->where('client', $id)->get(); $comments = $client->comments()->where('user_id', $client->id)->get(); + return view( 'themes.default1.user.client.show', compact( diff --git a/app/Http/Requests/User/ClientRequest.php b/app/Http/Requests/User/ClientRequest.php index 7350921b98..4e4ff44808 100755 --- a/app/Http/Requests/User/ClientRequest.php +++ b/app/Http/Requests/User/ClientRequest.php @@ -26,11 +26,11 @@ public function rules() switch ($this->method()) { case 'POST': return [ - 'first_name' => 'required', - 'last_name' => 'required', - 'email' => 'required|email|unique:users', - 'mobile' => 'required', - 'bussiness' => 'required', + 'first_name' => 'required', + 'last_name' => 'required', + 'email' => 'required|email|unique:users', + 'mobile' => 'required', + 'bussiness' => 'required', 'timezone_id' => 'required', 'address' => 'required', 'zip' => 'required', diff --git a/app/Traits/ApiKeySettings.php b/app/Traits/ApiKeySettings.php index b1827d9cee..a48d3eea58 100644 --- a/app/Traits/ApiKeySettings.php +++ b/app/Traits/ApiKeySettings.php @@ -46,7 +46,7 @@ public function updatemobileDetails(Request $request) $status = $request->input('status'); $key = $request->input('msg91_auth_key'); StatusSetting::find(1)->update(['msg91_status'=>$status]); - ApiKey::find(1)->update(['msg91_auth_key'=>$key,'msg91_sender'=>$request->input('msg91_sender')]); + ApiKey::find(1)->update(['msg91_auth_key'=>$key, 'msg91_sender'=>$request->input('msg91_sender')]); return ['message' => 'success', 'update'=>'Msg91 Settings Updated']; } diff --git a/database/migrations/2018_07_09_092247_add_msg91_auth_key_to_api_keys.php b/database/migrations/2018_07_09_092247_add_msg91_auth_key_to_api_keys.php index caa840702b..4555cf85e6 100644 --- a/database/migrations/2018_07_09_092247_add_msg91_auth_key_to_api_keys.php +++ b/database/migrations/2018_07_09_092247_add_msg91_auth_key_to_api_keys.php @@ -15,7 +15,7 @@ public function up() { Schema::table('api_keys', function (Blueprint $table) { $table->string('msg91_auth_key', 255)->nullable(); - $table->string('msg91_sender',50)->nullable(); + $table->string('msg91_sender', 50)->nullable(); }); } diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 31a66f6b27..c1aedc86cd 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -18,7 +18,6 @@ use App\Model\Payment\PromotionType; use App\Model\Payment\TaxOption; use App\Model\Product\Product; -use App\Model\Product\ProductGroup; use App\Model\Product\Type; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Seeder; @@ -184,8 +183,6 @@ public function run() } } - - class PromotionTableSeeder extends Seeder { public function run() @@ -197,8 +194,6 @@ public function run() } } - - class PromotionTypeTableSeeder extends Seeder { public function run() diff --git a/resources/lang/en/message.php b/resources/lang/en/message.php index 51c6672550..57d3a4ecdf 100644 --- a/resources/lang/en/message.php +++ b/resources/lang/en/message.php @@ -182,8 +182,7 @@ 'lic_api_secret' => 'API Secret', 'lic_api_url' => 'API URL', 'msg91_key' => 'Msg91 Auth Key', - 'msg91_sender' => 'Sender' -, 'consumer_key' => 'Twitter Consumer Key', + 'msg91_sender' => 'Sender', 'consumer_key' => 'Twitter Consumer Key', 'consumer_secret' => 'Twitter Consumer Secret', 'access_token' => 'Twitter Access Token', 'token_secret' => 'Twitter Access Token Secret',