diff --git a/README.md b/README.md index 96cac2e2c..7c2a59925 100755 --- a/README.md +++ b/README.md @@ -74,11 +74,11 @@ Take advantage of two of the hottest frameworks used in this project -- Laravel ### Installation and Configuration -**1. Try our new GUI installer to install Bagisto:** +**1. You can install Bagisto by using the GUI installer.** ##### a. Download zip from the link below: -[Download](https://github.com/bagisto/bagisto/archive/v0.1.6.zip) +[Download the latest release](https://github.com/bagisto/bagisto/releases/latest) ##### b. Extract the contents of zip and execute the project in your browser: @@ -92,7 +92,7 @@ or http(s)://example.com/public ~~~ -**2. Try our old fashioned way to install Bagisto:** +**2. Or you can install Bagisto from your console.** ##### Execute these commands below, in order @@ -100,44 +100,10 @@ http(s)://example.com/public 1. composer create-project bagisto/bagisto ~~~ -**Now, configure your database:** - -If the above command was completed successfully, then you'll find directory **bagisto** with all of the code inside it. - -Find file **.env** inside **bagisto** directory and set the environment variables listed below: - -* **APP_URL** -* **DB_CONNECTION** -* **DB_HOST** -* **DB_PORT** -* **DB_DATABASE** -* **DB_USERNAME** -* **DB_PASSWORD** - -Mailer environment variables are also required to be set up. This is because **Bagisto** needs to send emails to customers and admins depending on what events require notification. - ~~~ -2. php artisan migrate +2. php artisan bagisto:install ~~~ -~~~ -3. php artisan db:seed -~~~ - -~~~ -4. php artisan vendor:publish --> Press 0 and then press enter to publish all assets and configurations. -~~~ - -~~~ -5. php artisan storage:link -~~~ - -~~~ -6. composer dump-autoload -~~~ - - **To execute Bagisto**: ##### On server: diff --git a/packages/Webkul/API/Http/Controllers/Shop/AddressController.php b/packages/Webkul/API/Http/Controllers/Shop/AddressController.php index 5e438c802..8a909c8ca 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/AddressController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/AddressController.php @@ -79,7 +79,7 @@ class AddressController extends Controller request()->merge([ 'address1' => implode(PHP_EOL, array_filter(request()->input('address1'))), - 'customer_id' => $customer->id + 'customer_id' => $customer->id, ]); $this->validate(request(), [ @@ -88,14 +88,14 @@ class AddressController extends Controller 'state' => 'string|required', 'city' => 'string|required', 'postcode' => 'required', - 'phone' => 'required' + 'phone' => 'required', ]); $customerAddress = $this->customerAddressRepository->create(request()->all()); return response()->json([ 'message' => 'Your address has been created successfully.', - 'data' => new CustomerAddressResource($customerAddress) + 'data' => new CustomerAddressResource($customerAddress), ]); } @@ -116,14 +116,14 @@ class AddressController extends Controller 'state' => 'string|required', 'city' => 'string|required', 'postcode' => 'required', - 'phone' => 'required' + 'phone' => 'required', ]); $this->customerAddressRepository->update(request()->all(), request()->input('id')); return response()->json([ 'message' => 'Your address has been updated successfully.', - 'data' => new CustomerAddressResource($this->customerAddressRepository->find(request()->input('id'))) + 'data' => new CustomerAddressResource($this->customerAddressRepository->find(request()->input('id'))), ]); } } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Controllers/Shop/CartController.php b/packages/Webkul/API/Http/Controllers/Shop/CartController.php index 545185a11..4c10fea5c 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CartController.php @@ -84,7 +84,7 @@ class CartController extends Controller $cart = Cart::getCart(); return response()->json([ - 'data' => $cart ? new CartResource($cart) : null + 'data' => $cart ? new CartResource($cart) : null, ]); } @@ -110,7 +110,7 @@ class CartController extends Controller $message = session()->get('warning') ?? session()->get('error'); return response()->json([ - 'error' => session()->get('warning') + 'error' => session()->get('warning'), ], 400); } @@ -126,7 +126,7 @@ class CartController extends Controller return response()->json([ 'message' => __('shop::app.checkout.cart.item.success'), - 'data' => $cart ? new CartResource($cart) : null + 'data' => $cart ? new CartResource($cart) : null, ]); } @@ -140,7 +140,7 @@ class CartController extends Controller foreach (request()->get('qty') as $qty) { if ($qty <= 0) { return response()->json([ - 'message' => trans('shop::app.checkout.cart.quantity.illegal') + 'message' => trans('shop::app.checkout.cart.quantity.illegal'), ], 401); } } @@ -161,7 +161,7 @@ class CartController extends Controller return response()->json([ 'message' => __('shop::app.checkout.cart.quantity.success'), - 'data' => $cart ? new CartResource($cart) : null + 'data' => $cart ? new CartResource($cart) : null, ]); } @@ -182,7 +182,7 @@ class CartController extends Controller return response()->json([ 'message' => __('shop::app.checkout.cart.item.success-remove'), - 'data' => $cart ? new CartResource($cart) : null + 'data' => $cart ? new CartResource($cart) : null, ]); } @@ -207,7 +207,7 @@ class CartController extends Controller return response()->json([ 'message' => __('shop::app.checkout.cart.item.success-remove'), - 'data' => $cart ? new CartResource($cart) : null + 'data' => $cart ? new CartResource($cart) : null, ]); } @@ -231,7 +231,7 @@ class CartController extends Controller return response()->json([ 'message' => __('shop::app.checkout.cart.move-to-wishlist-success'), - 'data' => $cart ? new CartResource($cart) : null + 'data' => $cart ? new CartResource($cart) : null, ]); } } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Controllers/Shop/CheckoutController.php b/packages/Webkul/API/Http/Controllers/Shop/CheckoutController.php index cc34a0fe5..6fbca5923 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CheckoutController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CheckoutController.php @@ -106,7 +106,7 @@ class CheckoutController extends Controller foreach (Shipping::getGroupedAllShippingRates() as $code => $shippingMethod) { $rates[] = [ 'carrier_title' => $shippingMethod['carrier_title'], - 'rates' => CartShippingRateResource::collection(collect($shippingMethod['rates'])) + 'rates' => CartShippingRateResource::collection(collect($shippingMethod['rates'])), ]; } @@ -115,7 +115,7 @@ class CheckoutController extends Controller return response()->json([ 'data' => [ 'rates' => $rates, - 'cart' => new CartResource(Cart::getCart()) + 'cart' => new CartResource(Cart::getCart()), ] ]); } @@ -141,7 +141,7 @@ class CheckoutController extends Controller return response()->json([ 'data' => [ 'methods' => Payment::getPaymentMethods(), - 'cart' => new CartResource(Cart::getCart()) + 'cart' => new CartResource(Cart::getCart()), ] ]); } @@ -161,7 +161,7 @@ class CheckoutController extends Controller return response()->json([ 'data' => [ - 'cart' => new CartResource(Cart::getCart()) + 'cart' => new CartResource(Cart::getCart()), ] ]); } @@ -186,7 +186,7 @@ class CheckoutController extends Controller if ($redirectUrl = Payment::getRedirectUrl($cart)) { return response()->json([ 'success' => true, - 'redirect_url' => $redirectUrl + 'redirect_url' => $redirectUrl, ]); } diff --git a/packages/Webkul/API/Http/Controllers/Shop/CoreController.php b/packages/Webkul/API/Http/Controllers/Shop/CoreController.php index 27290bdcd..e2bc499bd 100755 --- a/packages/Webkul/API/Http/Controllers/Shop/CoreController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CoreController.php @@ -26,7 +26,7 @@ class CoreController extends Controller } return response()->json([ - 'data' => $configValues + 'data' => $configValues, ]); } @@ -38,7 +38,7 @@ class CoreController extends Controller public function getCountryStateGroup() { return response()->json([ - 'data' => core()->groupedStatesByCountries() + 'data' => core()->groupedStatesByCountries(), ]); } diff --git a/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php b/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php index bd5d0e4f2..63c5260f1 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/CustomerController.php @@ -65,7 +65,7 @@ class CustomerController extends Controller 'first_name' => 'required', 'last_name' => 'required', 'email' => 'email|required|unique:customers,email', - 'password' => 'confirmed|min:6|required' + 'password' => 'confirmed|min:6|required', ]); $data = request()->input(); @@ -73,7 +73,7 @@ class CustomerController extends Controller $data = array_merge($data, [ 'password' => bcrypt($data['password']), 'channel_id' => core()->getCurrentChannel()->id, - 'is_verified' => 1 + 'is_verified' => 1, ]); $data['customer_group_id'] = $this->customerGroupRepository->findOneWhere(['code' => 'general'])->id; @@ -85,7 +85,7 @@ class CustomerController extends Controller Event::dispatch('customer.registration.after', $customer); return response()->json([ - 'message' => 'Your account has been created successfully.' + 'message' => 'Your account has been created successfully.', ]); } } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Controllers/Shop/ForgotPasswordController.php b/packages/Webkul/API/Http/Controllers/Shop/ForgotPasswordController.php index 4828c4950..52ead1d65 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/ForgotPasswordController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/ForgotPasswordController.php @@ -23,19 +23,19 @@ class ForgotPasswordController extends Controller public function store() { $this->validate(request(), [ - 'email' => 'required|email' + 'email' => 'required|email', ]); $response = $this->broker()->sendResetLink(request(['email'])); if ($response == Password::RESET_LINK_SENT) { return response()->json([ - 'message' => trans($response) + 'message' => trans($response), ]); } return response()->json([ - 'error' => trans($response) + 'error' => trans($response), ]); } diff --git a/packages/Webkul/API/Http/Controllers/Shop/ProductController.php b/packages/Webkul/API/Http/Controllers/Shop/ProductController.php index 7664c86b4..ebcac1ea1 100755 --- a/packages/Webkul/API/Http/Controllers/Shop/ProductController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/ProductController.php @@ -63,7 +63,7 @@ class ProductController extends Controller public function additionalInformation($id) { return response()->json([ - 'data' => app('Webkul\Product\Helpers\View')->getAdditionalData($this->productRepository->findOrFail($id)) + 'data' => app('Webkul\Product\Helpers\View')->getAdditionalData($this->productRepository->findOrFail($id)), ]); } @@ -75,7 +75,7 @@ class ProductController extends Controller public function configurableConfig($id) { return response()->json([ - 'data' => app('Webkul\Product\Helpers\ConfigurableOption')->getConfigurationConfig($this->productRepository->findOrFail($id)) + 'data' => app('Webkul\Product\Helpers\ConfigurableOption')->getConfigurationConfig($this->productRepository->findOrFail($id)), ]); } } diff --git a/packages/Webkul/API/Http/Controllers/Shop/ResourceController.php b/packages/Webkul/API/Http/Controllers/Shop/ResourceController.php index 1ab9c6ad6..500d50a45 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/ResourceController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/ResourceController.php @@ -108,7 +108,7 @@ class ResourceController extends Controller $this->repository->delete($id); return response()->json([ - 'message' => 'Item removed successfully.' + 'message' => 'Item removed successfully.', ]); } } diff --git a/packages/Webkul/API/Http/Controllers/Shop/ReviewController.php b/packages/Webkul/API/Http/Controllers/Shop/ReviewController.php index 01f3e08e9..dbe44d6ed 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/ReviewController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/ReviewController.php @@ -62,14 +62,14 @@ class ReviewController extends Controller 'customer_id' => $customer ? $customer->id : null, 'name' => $customer ? $customer->name : request()->input('name'), 'status' => 'pending', - 'product_id' => $id + 'product_id' => $id, ]); $productReview = $this->reviewRepository->create($data); return response()->json([ 'message' => 'Your review submitted successfully.', - 'data' => new ProductReviewResource($this->reviewRepository->find($productReview->id)) + 'data' => new ProductReviewResource($this->reviewRepository->find($productReview->id)), ]); } } \ No newline at end of file diff --git a/packages/Webkul/API/Http/Controllers/Shop/SessionController.php b/packages/Webkul/API/Http/Controllers/Shop/SessionController.php index 8ac8c818c..0c37aed69 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/SessionController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/SessionController.php @@ -54,8 +54,8 @@ class SessionController extends Controller public function create() { request()->validate([ - 'email' => 'required|email', - 'password' => 'required' + 'email' => 'required|email', + 'password' => 'required', ]); $jwtToken = null; @@ -71,9 +71,9 @@ class SessionController extends Controller $customer = auth($this->guard)->user(); return response()->json([ - 'token' => $jwtToken, + 'token' => $jwtToken, 'message' => 'Logged in successfully.', - 'data' => new CustomerResource($customer) + 'data' => new CustomerResource($customer), ]); } @@ -87,7 +87,7 @@ class SessionController extends Controller $customer = auth($this->guard)->user(); return response()->json([ - 'data' => new CustomerResource($customer) + 'data' => new CustomerResource($customer), ]); } @@ -106,7 +106,7 @@ class SessionController extends Controller 'gender' => 'required', 'date_of_birth' => 'nullable|date|before:today', 'email' => 'email|unique:customers,email,' . $customer->id, - 'password' => 'confirmed|min:6' + 'password' => 'confirmed|min:6', ]); $data = request()->all(); @@ -125,7 +125,7 @@ class SessionController extends Controller return response()->json([ 'message' => 'Your account has been created successfully.', - 'data' => new CustomerResource($this->customerRepository->find($customer->id)) + 'data' => new CustomerResource($this->customerRepository->find($customer->id)), ]); } diff --git a/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php b/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php index bfcd6e483..53cc9873b 100644 --- a/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php +++ b/packages/Webkul/API/Http/Controllers/Shop/WishlistController.php @@ -66,26 +66,26 @@ class WishlistController extends Controller $wishlistItem = $this->wishlistRepository->findOneWhere([ 'channel_id' => core()->getCurrentChannel()->id, 'product_id' => $id, - 'customer_id' => $customer->id + 'customer_id' => $customer->id, ]); if (! $wishlistItem) { $wishlistItem = $this->wishlistRepository->create([ 'channel_id' => core()->getCurrentChannel()->id, 'product_id' => $id, - 'customer_id' => $customer->id + 'customer_id' => $customer->id, ]); return response()->json([ 'data' => new WishlistResource($wishlistItem), - 'message' => trans('customer::app.wishlist.success') + 'message' => trans('customer::app.wishlist.success'), ]); } else { $this->wishlistRepository->delete($wishlistItem->id); return response()->json([ 'data' => null, - 'message' => 'Item removed from wishlist successfully.' + 'message' => 'Item removed from wishlist successfully.', ]); } } @@ -102,7 +102,7 @@ class WishlistController extends Controller if ($wishlistItem->customer_id != auth()->guard($this->guard)->user()->id) { return response()->json([ - 'message' => trans('shop::app.security-warning') + 'message' => trans('shop::app.security-warning'), ], 400); } @@ -115,12 +115,12 @@ class WishlistController extends Controller return response()->json([ 'data' => $cart ? new CartResource($cart) : null, - 'message' => trans('shop::app.wishlist.moved') + 'message' => trans('shop::app.wishlist.moved'), ]); } else { return response()->json([ 'data' => -1, - 'error' => trans('shop::app.wishlist.option-missing') + 'error' => trans('shop::app.wishlist.option-missing'), ], 400); } } diff --git a/packages/Webkul/Admin/src/Config/acl.php b/packages/Webkul/Admin/src/Config/acl.php index 251550c81..da1c7d9dd 100755 --- a/packages/Webkul/Admin/src/Config/acl.php +++ b/packages/Webkul/Admin/src/Config/acl.php @@ -5,417 +5,417 @@ return [ 'key' => 'dashboard', 'name' => 'admin::app.acl.dashboard', 'route' => 'admin.dashboard.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'sales', 'name' => 'admin::app.acl.sales', 'route' => 'admin.sales.orders.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'sales.orders', 'name' => 'admin::app.acl.orders', 'route' => 'admin.sales.orders.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'sales.invoices', 'name' => 'admin::app.acl.invoices', 'route' => 'admin.sales.invoices.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'sales.shipments', 'name' => 'admin::app.acl.shipments', 'route' => 'admin.sales.shipments.index', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'catalog', 'name' => 'admin::app.acl.catalog', 'route' => 'admin.catalog.index', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'catalog.products', 'name' => 'admin::app.acl.products', 'route' => 'admin.catalog.products.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'catalog.products.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.catalog.products.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'catalog.products.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.catalog.products.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'catalog.products.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.catalog.products.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'catalog.categories', 'name' => 'admin::app.acl.categories', 'route' => 'admin.catalog.categories.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'catalog.categories.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.catalog.categories.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'catalog.categories.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.catalog.categories.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'catalog.categories.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.catalog.categories.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'catalog.attributes', 'name' => 'admin::app.acl.attributes', 'route' => 'admin.catalog.attributes.index', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'catalog.attributes.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.catalog.attributes.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'catalog.attributes.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.catalog.attributes.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'catalog.attributes.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.catalog.attributes.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'catalog.families', 'name' => 'admin::app.acl.attribute-families', 'route' => 'admin.catalog.families.index', - 'sort' => 4 + 'sort' => 4, ], [ 'key' => 'catalog.families.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.catalog.families.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'catalog.families.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.catalog.families.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'catalog.families.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.catalog.families.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'customers', 'name' => 'admin::app.acl.customers', 'route' => 'admin.customer.index', - 'sort' => 4 + 'sort' => 4, ], [ 'key' => 'customers.customers', 'name' => 'admin::app.acl.customers', 'route' => 'admin.customer.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'customers.customers.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.customer.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'customers.customers.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.customer.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'customers.customers.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.customer.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'customers.groups', 'name' => 'admin::app.acl.groups', 'route' => 'admin.groups.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'customers.groups.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.groups.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'customers.groups.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.groups.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'customers.groups.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.groups.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'customers.reviews', 'name' => 'admin::app.acl.reviews', 'route' => 'admin.customer.review.index', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'customers.reviews.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.customer.review.edit', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'customers.reviews.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.customer.review.delete', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'configuration', 'name' => 'admin::app.acl.configure', 'route' => 'admin.configuration.index', - 'sort' => 5 + 'sort' => 5, ], [ 'key' => 'settings', 'name' => 'admin::app.acl.settings', 'route' => 'admin.users.index', - 'sort' => 6 + 'sort' => 6, ], [ 'key' => 'settings.locales', 'name' => 'admin::app.acl.locales', 'route' => 'admin.locales.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.locales.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.locales.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.locales.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.locales.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.locales.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.locales.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.currencies', 'name' => 'admin::app.acl.currencies', 'route' => 'admin.currencies.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.currencies.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.currencies.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.currencies.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.currencies.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.currencies.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.currencies.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.exchange_rates', 'name' => 'admin::app.acl.exchange-rates', 'route' => 'admin.exchange_rates.index', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.exchange_rates.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.exchange_rates.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.exchange_rates.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.exchange_rates.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.exchange_rates.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.exchange_rates.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.inventory_sources', 'name' => 'admin::app.acl.inventory-sources', 'route' => 'admin.inventory_sources.index', - 'sort' => 4 + 'sort' => 4, ], [ 'key' => 'settings.inventory_sources.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.inventory_sources.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.inventory_sources.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.inventory_sources.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.inventory_sources.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.inventory_sources.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.channels', 'name' => 'admin::app.acl.channels', 'route' => 'admin.channels.index', - 'sort' => 5 + 'sort' => 5, ], [ 'key' => 'settings.channels.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.channels.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.channels.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.channels.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.channels.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.channels.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.users', 'name' => 'admin::app.acl.users', 'route' => 'admin.users.index', - 'sort' => 6 + 'sort' => 6, ], [ 'key' => 'settings.users.users', 'name' => 'admin::app.acl.users', 'route' => 'admin.users.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.users.users.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.users.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.users.users.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.users.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.users.users.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.users.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.users.roles', 'name' => 'admin::app.acl.roles', 'route' => 'admin.roles.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.users.roles.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.roles.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.users.roles.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.roles.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.users.roles.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.roles.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.sliders', 'name' => 'admin::app.acl.sliders', 'route' => 'admin.sliders.index', - 'sort' => 7 + 'sort' => 7, ], [ 'key' => 'settings.sliders.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.sliders.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.sliders.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.sliders.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.sliders.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.sliders.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.taxes', 'name' => 'admin::app.acl.taxes', 'route' => 'admin.tax-categories.index', - 'sort' => 8 + 'sort' => 8, ], [ 'key' => 'settings.taxes.tax-categories', 'name' => 'admin::app.acl.tax-categories', 'route' => 'admin.tax-categories.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.taxes.tax-categories.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.tax-categories.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.taxes.tax-categories.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.tax-categories.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.taxes.tax-categories.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.tax-categories.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'settings.taxes.tax-rates', 'name' => 'admin::app.acl.tax-rates', 'route' => 'admin.tax-rates.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.taxes.tax-rates.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.tax-rates.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'settings.taxes.tax-rates.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.tax-rates.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'settings.taxes.tax-rates.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.tax-rates.delete', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'promotions', 'name' => 'admin::app.acl.promotions', 'route' => 'admin.cart-rules.index', - 'sort' => 7 + 'sort' => 7, ], [ 'key' => 'promotions.cart-rules', 'name' => 'admin::app.acl.cart-rules', 'route' => 'admin.cart-rules.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'promotions.cart-rules.create', 'name' => 'admin::app.acl.create', 'route' => 'admin.cart-rules.create', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'promotions.cart-rules.edit', 'name' => 'admin::app.acl.edit', 'route' => 'admin.cart-rules.edit', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'promotions.cart-rules.delete', 'name' => 'admin::app.acl.delete', 'route' => 'admin.cart-rules.delete', - 'sort' => 3 + 'sort' => 3, ], ]; diff --git a/packages/Webkul/Admin/src/Config/menu.php b/packages/Webkul/Admin/src/Config/menu.php index dd5fed828..426ef3edc 100755 --- a/packages/Webkul/Admin/src/Config/menu.php +++ b/packages/Webkul/Admin/src/Config/menu.php @@ -6,210 +6,210 @@ return [ 'name' => 'admin::app.layouts.dashboard', 'route' => 'admin.dashboard.index', 'sort' => 1, - 'icon-class' => 'dashboard-icon' + 'icon-class' => 'dashboard-icon', ], [ 'key' => 'sales', 'name' => 'admin::app.layouts.sales', 'route' => 'admin.sales.orders.index', 'sort' => 2, - 'icon-class' => 'sales-icon' + 'icon-class' => 'sales-icon', ], [ 'key' => 'sales.orders', 'name' => 'admin::app.layouts.orders', 'route' => 'admin.sales.orders.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'sales.shipments', 'name' => 'admin::app.layouts.shipments', 'route' => 'admin.sales.shipments.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'sales.invoices', 'name' => 'admin::app.layouts.invoices', 'route' => 'admin.sales.invoices.index', 'sort' => 3, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'sales.refunds', 'name' => 'admin::app.layouts.refunds', 'route' => 'admin.sales.refunds.index', 'sort' => 4, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'catalog', 'name' => 'admin::app.layouts.catalog', 'route' => 'admin.catalog.products.index', 'sort' => 3, - 'icon-class' => 'catalog-icon' + 'icon-class' => 'catalog-icon', ], [ 'key' => 'catalog.products', 'name' => 'admin::app.layouts.products', 'route' => 'admin.catalog.products.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'catalog.categories', 'name' => 'admin::app.layouts.categories', 'route' => 'admin.catalog.categories.index', 'sort' => 3, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'catalog.attributes', 'name' => 'admin::app.layouts.attributes', 'route' => 'admin.catalog.attributes.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'catalog.families', 'name' => 'admin::app.layouts.attribute-families', 'route' => 'admin.catalog.families.index', 'sort' => 4, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'customers', 'name' => 'admin::app.layouts.customers', 'route' => 'admin.customer.index', 'sort' => 4, - 'icon-class' => 'customer-icon' + 'icon-class' => 'customer-icon', ], [ 'key' => 'customers.customers', 'name' => 'admin::app.layouts.customers', 'route' => 'admin.customer.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'customers.groups', 'name' => 'admin::app.layouts.groups', 'route' => 'admin.groups.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'customers.reviews', 'name' => 'admin::app.layouts.reviews', 'route' => 'admin.customer.review.index', 'sort' => 3, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'customers.subscribers', 'name' => 'admin::app.layouts.newsletter-subscriptions', 'route' => 'admin.customers.subscribers.index', 'sort' => 4, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'configuration', 'name' => 'admin::app.layouts.configure', 'route' => 'admin.configuration.index', 'sort' => 7, - 'icon-class' => 'configuration-icon' + 'icon-class' => 'configuration-icon', ], [ 'key' => 'settings', 'name' => 'admin::app.layouts.settings', 'route' => 'admin.locales.index', 'sort' => 6, - 'icon-class' => 'settings-icon' + 'icon-class' => 'settings-icon', ], [ 'key' => 'settings.locales', 'name' => 'admin::app.layouts.locales', 'route' => 'admin.locales.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.currencies', 'name' => 'admin::app.layouts.currencies', 'route' => 'admin.currencies.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.exchange_rates', 'name' => 'admin::app.layouts.exchange-rates', 'route' => 'admin.exchange_rates.index', 'sort' => 3, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.inventory_sources', 'name' => 'admin::app.layouts.inventory-sources', 'route' => 'admin.inventory_sources.index', 'sort' => 4, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.channels', 'name' => 'admin::app.layouts.channels', 'route' => 'admin.channels.index', 'sort' => 5, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.users', 'name' => 'admin::app.layouts.users', 'route' => 'admin.users.index', 'sort' => 6, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.users.users', 'name' => 'admin::app.layouts.users', 'route' => 'admin.users.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.users.roles', 'name' => 'admin::app.layouts.roles', 'route' => 'admin.roles.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.sliders', 'name' => 'admin::app.layouts.sliders', 'route' => 'admin.sliders.index', 'sort' => 7, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.taxes', 'name' => 'admin::app.layouts.taxes', 'route' => 'admin.tax-categories.index', 'sort' => 8, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.taxes.tax-categories', 'name' => 'admin::app.layouts.tax-categories', 'route' => 'admin.tax-categories.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'settings.taxes.tax-rates', 'name' => 'admin::app.layouts.tax-rates', 'route' => 'admin.tax-rates.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'promotions', 'name' => 'admin::app.layouts.promotions', 'route' => 'admin.catalog-rules.index', 'sort' => 5, - 'icon-class' => 'promotion-icon' + 'icon-class' => 'promotion-icon', ], [ 'key' => 'promotions.catalog-rules', 'name' => 'admin::app.promotions.catalog-rules.title', 'route' => 'admin.catalog-rules.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'promotions.cart-rules', 'name' => 'admin::app.promotions.cart-rules.title', 'route' => 'admin.cart-rules.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'cms', 'name' => 'admin::app.layouts.cms', 'route' => 'admin.cms.index', 'sort' => 5, - 'icon-class' => 'cms-icon' + 'icon-class' => 'cms-icon', ], [ 'key' => 'cms.pages', 'name' => 'admin::app.cms.pages.pages', 'route' => 'admin.cms.index', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ] ]; \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php index 6292d7259..7a843df26 100644 --- a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php @@ -56,7 +56,7 @@ class AddressDataGrid extends DataGrid $queryBuilder = $queryBuilder->leftJoin('country_states', function($qb) { $qb->on('ca.state', 'country_states.code') - ->on('countries.id', 'country_states.country_id'); + ->on('countries.id', 'country_states.country_id'); }); $queryBuilder->groupBy('ca.id') @@ -82,7 +82,7 @@ class AddressDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -91,7 +91,7 @@ class AddressDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -100,7 +100,7 @@ class AddressDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -109,7 +109,7 @@ class AddressDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -118,7 +118,7 @@ class AddressDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -127,7 +127,7 @@ class AddressDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -143,7 +143,7 @@ class AddressDataGrid extends DataGrid } else { return trans('admin::app.customers.addresses.dash'); } - } + }, ]); } @@ -153,7 +153,7 @@ class AddressDataGrid extends DataGrid 'type' => 'Edit', 'method' => 'GET', 'route' => 'admin.customer.addresses.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -161,7 +161,7 @@ class AddressDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.customer.addresses.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'address']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -171,7 +171,7 @@ class AddressDataGrid extends DataGrid 'type' => 'delete', 'label' => trans('admin::app.customers.addresses.delete'), 'action' => route('admin.customer.addresses.massdelete', request('id')), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php index 42dc3e338..8031902ff 100755 --- a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php @@ -34,7 +34,7 @@ class AttributeDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -43,7 +43,7 @@ class AttributeDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -52,7 +52,7 @@ class AttributeDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -61,7 +61,7 @@ class AttributeDataGrid extends DataGrid 'type' => 'string', 'sortable' => true, 'searchable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -76,7 +76,7 @@ class AttributeDataGrid extends DataGrid } else { return 'False'; } - } + }, ]); $this->addColumn([ @@ -92,7 +92,7 @@ class AttributeDataGrid extends DataGrid } else { return 'False'; } - } + }, ]); $this->addColumn([ @@ -108,7 +108,7 @@ class AttributeDataGrid extends DataGrid } else { return 'False'; } - } + }, ]); $this->addColumn([ @@ -124,7 +124,7 @@ class AttributeDataGrid extends DataGrid } else { return 'False'; } - } + }, ]); } @@ -134,14 +134,14 @@ class AttributeDataGrid extends DataGrid 'title' => 'Edit Attribute', 'method' => 'GET', 'route' => 'admin.catalog.attributes.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Attribute', 'method' => 'POST', 'route' => 'admin.catalog.attributes.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -152,7 +152,7 @@ class AttributeDataGrid extends DataGrid 'action' => route('admin.catalog.attributes.massdelete'), 'label' => trans('admin::app.datagrid.delete'), 'index' => 'admin_name', - 'method' => 'DELETE' + 'method' => 'DELETE', ]); } } diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php index 3e736e995..426aebd34 100755 --- a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php @@ -32,7 +32,7 @@ class AttributeFamilyDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class AttributeFamilyDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -59,14 +59,14 @@ class AttributeFamilyDataGrid extends DataGrid 'title' => 'Edit Attribute Family', 'method' => 'GET', 'route' => 'admin.catalog.families.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Attribute Family', 'method' => 'POST', 'route' => 'admin.catalog.families.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CMSPageDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CMSPageDataGrid.php index b50ad0b0e..c2fb98aea 100644 --- a/packages/Webkul/Admin/src/DataGrids/CMSPageDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CMSPageDataGrid.php @@ -39,7 +39,7 @@ class CMSPageDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -48,7 +48,7 @@ class CMSPageDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -57,7 +57,7 @@ class CMSPageDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -66,14 +66,14 @@ class CMSPageDataGrid extends DataGrid 'title' => 'Edit CMSPage', 'method' => 'GET', 'route' => 'admin.cms.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete CMSPage', 'method' => 'POST', 'route' => 'admin.cms.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -83,7 +83,7 @@ class CMSPageDataGrid extends DataGrid 'type' => 'delete', 'label' => trans('admin::app.datagrid.delete'), 'action' => route('admin.cms.mass-delete'), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CartRuleCouponDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CartRuleCouponDataGrid.php index 43dab7124..28f458eeb 100644 --- a/packages/Webkul/Admin/src/DataGrids/CartRuleCouponDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CartRuleCouponDataGrid.php @@ -34,7 +34,7 @@ class CartRuleCouponDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -43,7 +43,7 @@ class CartRuleCouponDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -52,7 +52,7 @@ class CartRuleCouponDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -61,7 +61,7 @@ class CartRuleCouponDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -70,7 +70,7 @@ class CartRuleCouponDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -80,7 +80,7 @@ class CartRuleCouponDataGrid extends DataGrid 'type' => 'delete', 'action' => route('admin.cart-rule-coupons.mass-delete'), 'label' => trans('admin::app.datagrid.delete'), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); } } diff --git a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php index 9b05632e2..38e5a9238 100644 --- a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php @@ -40,7 +40,7 @@ class CartRuleDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -49,7 +49,7 @@ class CartRuleDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -58,7 +58,7 @@ class CartRuleDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -67,7 +67,7 @@ class CartRuleDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -76,7 +76,7 @@ class CartRuleDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -92,7 +92,7 @@ class CartRuleDataGrid extends DataGrid } else { return trans('admin::app.datagrid.inactive'); } - } + }, ]); $this->addColumn([ @@ -101,7 +101,7 @@ class CartRuleDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -111,14 +111,14 @@ class CartRuleDataGrid extends DataGrid 'title' => 'Edit Cart Rule', 'method' => 'GET', 'route' => 'admin.cart-rules.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Cart Rule', 'method' => 'POST', 'route' => 'admin.cart-rules.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } diff --git a/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php index 4acaf2f86..9a9a12494 100644 --- a/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php @@ -33,7 +33,7 @@ class CatalogRuleDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -42,7 +42,7 @@ class CatalogRuleDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -51,7 +51,7 @@ class CatalogRuleDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -60,7 +60,7 @@ class CatalogRuleDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -76,7 +76,7 @@ class CatalogRuleDataGrid extends DataGrid } else { return trans('admin::app.datagrid.inactive'); } - } + }, ]); $this->addColumn([ @@ -85,7 +85,7 @@ class CatalogRuleDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -95,14 +95,14 @@ class CatalogRuleDataGrid extends DataGrid 'title' => 'Edit Catalog Rule', 'method' => 'GET', 'route' => 'admin.catalog-rules.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Catalog Rule', 'method' => 'POST', 'route' => 'admin.catalog-rules.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } diff --git a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php index cfac52d06..9b670a064 100755 --- a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php @@ -43,7 +43,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -52,7 +52,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -61,7 +61,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -77,7 +77,7 @@ class CategoryDataGrid extends DataGrid } else { return 'Inactive'; } - } + }, ]); $this->addColumn([ @@ -86,7 +86,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'number', 'sortable' => true, 'searchable' => false, - 'filterable' => false + 'filterable' => false, ]); } @@ -95,7 +95,7 @@ class CategoryDataGrid extends DataGrid 'title' => 'Edit Category', 'method' => 'GET', 'route' => 'admin.catalog.categories.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -103,7 +103,7 @@ class CategoryDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.catalog.categories.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index 2ae1512ac..a7a83f7a5 100755 --- a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -32,7 +32,7 @@ class ChannelDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class ChannelDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class ChannelDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -59,7 +59,7 @@ class ChannelDataGrid extends DataGrid 'type' => 'string', 'sortable' => true, 'searchable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -68,7 +68,7 @@ class ChannelDataGrid extends DataGrid 'title' => 'Edit Channel', 'method' => 'GET', 'route' => 'admin.channels.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -76,7 +76,7 @@ class ChannelDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.channels.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php index 0521f332d..c73932aa2 100644 --- a/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php @@ -34,7 +34,7 @@ class CartRuleCouponsDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -43,7 +43,7 @@ class CartRuleCouponsDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -52,7 +52,7 @@ class CartRuleCouponsDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -61,7 +61,7 @@ class CartRuleCouponsDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -77,7 +77,7 @@ class CartRuleCouponsDataGrid extends DataGrid } else { return 'false'; } - } + }, ]); } } diff --git a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php index 151d5f2db..b705b8a70 100755 --- a/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php @@ -32,7 +32,7 @@ class CurrencyDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class CurrencyDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class CurrencyDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -59,14 +59,14 @@ class CurrencyDataGrid extends DataGrid 'title' => 'Edit Currency', 'method' => 'GET', 'route' => 'admin.currencies.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Currency', 'method' => 'POST', 'route' => 'admin.currencies.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php index a206881ef..59b14bc0c 100755 --- a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php @@ -43,7 +43,7 @@ class CustomerDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -52,7 +52,7 @@ class CustomerDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -61,7 +61,7 @@ class CustomerDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -70,7 +70,7 @@ class CustomerDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -87,7 +87,7 @@ class CustomerDataGrid extends DataGrid } else { return $row->phone; } - } + }, ]); $this->addColumn([ @@ -104,7 +104,7 @@ class CustomerDataGrid extends DataGrid } else { return $row->gender; } - } + }, ]); $this->addColumn([ @@ -121,7 +121,7 @@ class CustomerDataGrid extends DataGrid } else { return ''. trans('admin::app.customers.customers.inactive') .''; } - } + }, ]); } @@ -130,7 +130,7 @@ class CustomerDataGrid extends DataGrid 'method' => 'GET', 'route' => 'admin.customer.edit', 'icon' => 'icon pencil-lg-icon', - 'title' => trans('admin::app.customers.customers.edit-help-title') + 'title' => trans('admin::app.customers.customers.edit-help-title'), ]); $this->addAction([ @@ -138,21 +138,21 @@ class CustomerDataGrid extends DataGrid 'method' => 'GET', 'route' => 'admin.customer.addresses.index', 'icon' => 'icon list-icon', - 'title' => trans('admin::app.customers.customers.addresses') + 'title' => trans('admin::app.customers.customers.addresses'), ]); $this->addAction([ 'method' => 'POST', 'route' => 'admin.customer.delete', 'icon' => 'icon trash-icon', - 'title' => trans('admin::app.customers.customers.delete-help-title') + 'title' => trans('admin::app.customers.customers.delete-help-title'), ]); $this->addAction([ 'method' => 'GET', 'route' => 'admin.customer.note.create', 'icon' => 'icon note-icon', - 'title' => trans('admin::app.customers.note.help-title') + 'title' => trans('admin::app.customers.note.help-title'), ]); } @@ -175,8 +175,8 @@ class CustomerDataGrid extends DataGrid 'method' => 'PUT', 'options' => [ 'Active' => 1, - 'Inactive' => 0 - ] + 'Inactive' => 0, + ], ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php index f517d82e1..df8e75b02 100755 --- a/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerGroupDataGrid.php @@ -32,7 +32,7 @@ class CustomerGroupDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class CustomerGroupDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class CustomerGroupDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -59,14 +59,14 @@ class CustomerGroupDataGrid extends DataGrid 'title' => 'Edit Customer Group', 'method' => 'GET', 'route' => 'admin.groups.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Customer Group', 'method' => 'POST', 'route' => 'admin.groups.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php index 6571e6b74..a02d43aa8 100755 --- a/packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CustomerReviewDataGrid.php @@ -40,7 +40,7 @@ class CustomerReviewDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -49,7 +49,7 @@ class CustomerReviewDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -58,7 +58,7 @@ class CustomerReviewDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -67,7 +67,7 @@ class CustomerReviewDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => false + 'filterable' => false, ]); $this->addColumn([ @@ -96,14 +96,14 @@ class CustomerReviewDataGrid extends DataGrid 'title' => 'Edit Customer Review', 'method' => 'GET', 'route' => 'admin.customer.review.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Customer Review', 'method' => 'POST', 'route' => 'admin.customer.review.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -112,7 +112,7 @@ class CustomerReviewDataGrid extends DataGrid 'type' => 'delete', 'label' => trans('admin::app.datagrid.delete'), 'action' => route('admin.customer.review.massdelete'), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); $this->addMassAction([ @@ -123,8 +123,8 @@ class CustomerReviewDataGrid extends DataGrid 'options' => [ 'Pending' => 0, 'Approve' => 1, - 'Disapprove' => 2 - ] + 'Disapprove' => 2, + ], ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php index 42ed50fd8..439d2ad6c 100755 --- a/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php @@ -34,7 +34,7 @@ class ExchangeRatesDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -43,7 +43,7 @@ class ExchangeRatesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -52,7 +52,7 @@ class ExchangeRatesDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -61,7 +61,7 @@ class ExchangeRatesDataGrid extends DataGrid 'title' => 'Edit Exchange Rate', 'method' => 'GET', 'route' => 'admin.exchange_rates.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -69,7 +69,7 @@ class ExchangeRatesDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.exchange_rates.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php index 2a5607082..390d776ec 100755 --- a/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php @@ -32,7 +32,7 @@ class InventorySourcesDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class InventorySourcesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class InventorySourcesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -59,7 +59,7 @@ class InventorySourcesDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -75,7 +75,7 @@ class InventorySourcesDataGrid extends DataGrid } else { return 'Inactive'; } - } + }, ]); } @@ -84,7 +84,7 @@ class InventorySourcesDataGrid extends DataGrid 'title' => 'Edit Inventory Source', 'method' => 'GET', 'route' => 'admin.inventory_sources.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -92,7 +92,7 @@ class InventorySourcesDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.inventory_sources.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index 069ff3196..fd9517bfd 100755 --- a/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -32,7 +32,7 @@ class LocalesDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class LocalesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class LocalesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -67,7 +67,7 @@ class LocalesDataGrid extends DataGrid } else { return trans('admin::app.datagrid.rtl'); } - } + }, ]); } @@ -76,7 +76,7 @@ class LocalesDataGrid extends DataGrid 'title' => 'Edit Locales', 'method' => 'GET', 'route' => 'admin.locales.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -84,7 +84,7 @@ class LocalesDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.locales.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php b/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php index 38a1bd34b..dc9f19e04 100755 --- a/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/NewsLetterDataGrid.php @@ -32,7 +32,7 @@ class NewsLetterDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -48,7 +48,7 @@ class NewsLetterDataGrid extends DataGrid } else { return 'False'; } - } + }, ]); $this->addColumn([ @@ -57,7 +57,7 @@ class NewsLetterDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -66,7 +66,7 @@ class NewsLetterDataGrid extends DataGrid 'title' => 'Edit News Letter', 'method' => 'GET', 'route' => 'admin.customers.subscribers.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -74,7 +74,7 @@ class NewsLetterDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.customers.subscribers.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Exchange Rate']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php index fa4d0f9bb..e57a31a69 100755 --- a/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderDataGrid.php @@ -20,17 +20,17 @@ class OrderDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('orders') - ->leftJoin('order_address as order_address_shipping', function($leftJoin) { - $leftJoin->on('order_address_shipping.order_id', '=', 'orders.id') - ->where('order_address_shipping.address_type', 'shipping'); - }) - ->leftJoin('order_address as order_address_billing', function($leftJoin) { - $leftJoin->on('order_address_billing.order_id', '=', 'orders.id') - ->where('order_address_billing.address_type', 'billing'); - }) - ->addSelect('orders.id','orders.increment_id', 'orders.base_sub_total', 'orders.base_grand_total', 'orders.created_at', 'channel_name', 'status') - ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name) as billed_to')) - ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_shipping.first_name, " ", ' . DB::getTablePrefix() . 'order_address_shipping.last_name) as shipped_to')); + ->leftJoin('order_address as order_address_shipping', function($leftJoin) { + $leftJoin->on('order_address_shipping.order_id', '=', 'orders.id') + ->where('order_address_shipping.address_type', 'shipping'); + }) + ->leftJoin('order_address as order_address_billing', function($leftJoin) { + $leftJoin->on('order_address_billing.order_id', '=', 'orders.id') + ->where('order_address_billing.address_type', 'billing'); + }) + ->addSelect('orders.id','orders.increment_id', 'orders.base_sub_total', 'orders.base_grand_total', 'orders.created_at', 'channel_name', 'status') + ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name) as billed_to')) + ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_shipping.first_name, " ", ' . DB::getTablePrefix() . 'order_address_shipping.last_name) as shipped_to')); $this->addFilter('billed_to', DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name)')); $this->addFilter('shipped_to', DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_shipping.first_name, " ", ' . DB::getTablePrefix() . 'order_address_shipping.last_name)')); @@ -48,7 +48,7 @@ class OrderDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -57,7 +57,7 @@ class OrderDataGrid extends DataGrid 'type' => 'price', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -66,7 +66,7 @@ class OrderDataGrid extends DataGrid 'type' => 'price', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -75,7 +75,7 @@ class OrderDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -84,7 +84,7 @@ class OrderDataGrid extends DataGrid 'type' => 'string', 'sortable' => true, 'searchable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -111,7 +111,7 @@ class OrderDataGrid extends DataGrid } elseif ($value->status == "fraud") { return ''. trans('admin::app.sales.orders.order-status-fraud') . ''; } - } + }, ]); $this->addColumn([ @@ -120,7 +120,7 @@ class OrderDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -129,7 +129,7 @@ class OrderDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -138,7 +138,7 @@ class OrderDataGrid extends DataGrid 'title' => 'Order View', 'method' => 'GET', 'route' => 'admin.sales.orders.view', - 'icon' => 'icon eye-icon' + 'icon' => 'icon eye-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php index 07d2d3c8b..204f9bdb5 100755 --- a/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderInvoicesDataGrid.php @@ -39,7 +39,7 @@ class OrderInvoicesDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -48,7 +48,7 @@ class OrderInvoicesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -57,7 +57,7 @@ class OrderInvoicesDataGrid extends DataGrid 'type' => 'price', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -66,7 +66,7 @@ class OrderInvoicesDataGrid extends DataGrid 'type' => 'datetime', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -75,7 +75,7 @@ class OrderInvoicesDataGrid extends DataGrid 'title' => 'Order Invoice View', 'method' => 'GET', 'route' => 'admin.sales.invoices.view', - 'icon' => 'icon eye-icon' + 'icon' => 'icon eye-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/OrderRefundDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderRefundDataGrid.php index c3afffa28..4c9ebc224 100755 --- a/packages/Webkul/Admin/src/DataGrids/OrderRefundDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderRefundDataGrid.php @@ -20,13 +20,13 @@ class OrderRefundDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('refunds') - ->select('refunds.id', 'orders.increment_id', 'refunds.state', 'refunds.base_grand_total', 'refunds.created_at') - ->leftJoin('orders', 'refunds.order_id', '=', 'orders.id') - ->leftJoin('order_address as order_address_billing', function($leftJoin) { - $leftJoin->on('order_address_billing.order_id', '=', 'orders.id') - ->where('order_address_billing.address_type', 'billing'); - }) - ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name) as billed_to')); + ->select('refunds.id', 'orders.increment_id', 'refunds.state', 'refunds.base_grand_total', 'refunds.created_at') + ->leftJoin('orders', 'refunds.order_id', '=', 'orders.id') + ->leftJoin('order_address as order_address_billing', function($leftJoin) { + $leftJoin->on('order_address_billing.order_id', '=', 'orders.id') + ->where('order_address_billing.address_type', 'billing'); + }) + ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name) as billed_to')); $this->addFilter('billed_to', DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_billing.first_name, " ", ' . DB::getTablePrefix() . 'order_address_billing.last_name)')); $this->addFilter('id', 'refunds.id'); @@ -46,7 +46,7 @@ class OrderRefundDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -55,7 +55,7 @@ class OrderRefundDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -64,7 +64,7 @@ class OrderRefundDataGrid extends DataGrid 'type' => 'price', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -73,7 +73,7 @@ class OrderRefundDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -82,7 +82,7 @@ class OrderRefundDataGrid extends DataGrid 'type' => 'datetime', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -91,7 +91,7 @@ class OrderRefundDataGrid extends DataGrid 'title' => 'Order Refund View', 'method' => 'GET', 'route' => 'admin.sales.refunds.view', - 'icon' => 'icon eye-icon' + 'icon' => 'icon eye-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php index 9063aeb79..3000d664a 100755 --- a/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/OrderShipmentsDataGrid.php @@ -20,15 +20,15 @@ class OrderShipmentsDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('shipments') - ->leftJoin('order_address as order_address_shipping', function($leftJoin) { - $leftJoin->on('order_address_shipping.order_id', '=', 'shipments.order_id') - ->where('order_address_shipping.address_type', 'shipping'); - }) - ->leftJoin('orders as ors', 'shipments.order_id', '=', 'ors.id') - ->leftJoin('inventory_sources as is', 'shipments.inventory_source_id', '=', 'is.id') - ->select('shipments.id as shipment_id', 'ors.increment_id as shipment_order_id', 'shipments.total_qty as shipment_total_qty', 'ors.created_at as order_date', 'shipments.created_at as shipment_created_at') - ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_shipping.first_name, " ", ' . DB::getTablePrefix() . 'order_address_shipping.last_name) as shipped_to')) - ->selectRaw('IF(' . DB::getTablePrefix() . 'shipments.inventory_source_id IS NOT NULL,' . DB::getTablePrefix() . 'is.name, ' . DB::getTablePrefix() . 'shipments.inventory_source_name) as inventory_source_name'); + ->leftJoin('order_address as order_address_shipping', function($leftJoin) { + $leftJoin->on('order_address_shipping.order_id', '=', 'shipments.order_id') + ->where('order_address_shipping.address_type', 'shipping'); + }) + ->leftJoin('orders as ors', 'shipments.order_id', '=', 'ors.id') + ->leftJoin('inventory_sources as is', 'shipments.inventory_source_id', '=', 'is.id') + ->select('shipments.id as shipment_id', 'ors.increment_id as shipment_order_id', 'shipments.total_qty as shipment_total_qty', 'ors.created_at as order_date', 'shipments.created_at as shipment_created_at') + ->addSelect(DB::raw('CONCAT(' . DB::getTablePrefix() . 'order_address_shipping.first_name, " ", ' . DB::getTablePrefix() . 'order_address_shipping.last_name) as shipped_to')) + ->selectRaw('IF(' . DB::getTablePrefix() . 'shipments.inventory_source_id IS NOT NULL,' . DB::getTablePrefix() . 'is.name, ' . DB::getTablePrefix() . 'shipments.inventory_source_name) as inventory_source_name'); $this->addFilter('shipment_id', 'shipments.id'); $this->addFilter('shipment_order_id', 'ors.increment_id'); @@ -49,7 +49,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -58,7 +58,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -67,7 +67,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -76,7 +76,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -85,7 +85,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -94,7 +94,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'datetime', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -103,7 +103,7 @@ class OrderShipmentsDataGrid extends DataGrid 'type' => 'string', 'sortable' => true, 'searchable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -112,7 +112,7 @@ class OrderShipmentsDataGrid extends DataGrid 'title' => 'Order Shipment View', 'method' => 'GET', 'route' => 'admin.sales.shipments.view', - 'icon' => 'icon eye-icon' + 'icon' => 'icon eye-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php index a100bc255..5fac94c34 100644 --- a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -27,9 +27,13 @@ class ProductDataGrid extends DataGrid { parent::__construct(); - $this->locale = request()->get('locale') ?? 'all'; - - $this->channel = request()->get('channel') ?? 'all'; + $this->locale = request()->get('locale') == 'all' + ? app()->getLocale() + : (request()->get('locale') ?? app()->getLocale()); + + $this->channel = request()->get('channel') == 'all' + ? core()->getDefaultChannelCode() + : (request()->get('channel') ?? core()->getDefaultChannelCode()); } public function prepareQueryBuilder() @@ -47,17 +51,7 @@ class ProductDataGrid extends DataGrid 'product_flat.price', 'attribute_families.name as attribute_family', DB::raw('SUM(DISTINCT ' . DB::getTablePrefix() . 'product_inventories.qty) as quantity') - ); - - if ($this->locale !== 'all') { - $queryBuilder->where('locale', $this->locale); - } else { - $queryBuilder->whereNotNull('product_flat.name'); - } - - if ($this->channel !== 'all') { - $queryBuilder->where('channel', $this->channel); - } + )->where('locale', $this->locale)->where('locale', $this->locale); $queryBuilder->groupBy('product_flat.product_id'); @@ -79,7 +73,7 @@ class ProductDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -88,7 +82,7 @@ class ProductDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -97,7 +91,7 @@ class ProductDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -106,7 +100,7 @@ class ProductDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -115,7 +109,7 @@ class ProductDataGrid extends DataGrid 'type' => 'string', 'sortable' => true, 'searchable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -131,7 +125,7 @@ class ProductDataGrid extends DataGrid } else { return 'Inactive'; } - } + }, ]); $this->addColumn([ @@ -140,7 +134,7 @@ class ProductDataGrid extends DataGrid 'type' => 'price', 'sortable' => true, 'searchable' => false, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -156,7 +150,7 @@ class ProductDataGrid extends DataGrid } else { return $value->quantity; } - } + }, ]); } @@ -168,7 +162,7 @@ class ProductDataGrid extends DataGrid 'icon' => 'icon pencil-lg-icon', 'condition' => function() { return true; - } + }, ]); $this->addAction([ @@ -176,7 +170,7 @@ class ProductDataGrid extends DataGrid 'method' => 'POST', 'route' => 'admin.catalog.products.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'product']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -185,7 +179,7 @@ class ProductDataGrid extends DataGrid 'type' => 'delete', 'label' => trans('admin::app.datagrid.delete'), 'action' => route('admin.catalog.products.massdelete'), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); $this->addMassAction([ @@ -194,9 +188,9 @@ class ProductDataGrid extends DataGrid 'action' => route('admin.catalog.products.massupdate'), 'method' => 'PUT', 'options' => [ - 'Active' => 1, - 'Inactive' => 0 - ] + 'Active' => 1, + 'Inactive' => 0, + ], ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php index 64faffd13..5b3862e07 100755 --- a/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php @@ -33,7 +33,7 @@ class RolesDataGrid extends DataGrid 'searchable' => false, 'sortable' => true, 'width' => '40px', - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -42,7 +42,7 @@ class RolesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -51,7 +51,7 @@ class RolesDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -60,14 +60,14 @@ class RolesDataGrid extends DataGrid 'title' => 'Edit', 'method' => 'GET', 'route' => 'admin.roles.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete', 'method' => 'POST', 'route' => 'admin.roles.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index e770d297c..25b9f6bc5 100755 --- a/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -20,8 +20,8 @@ class SliderDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('sliders as sl') - ->addSelect('sl.id as slider_id', 'sl.title', 'ch.name') - ->leftJoin('channels as ch', 'sl.channel_id', '=', 'ch.id'); + ->addSelect('sl.id as slider_id', 'sl.title', 'ch.name') + ->leftJoin('channels as ch', 'sl.channel_id', '=', 'ch.id'); $this->addFilter('slider_id', 'sl.id'); $this->addFilter('channel_name', 'ch.name'); @@ -37,7 +37,7 @@ class SliderDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -46,7 +46,7 @@ class SliderDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -55,7 +55,7 @@ class SliderDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -64,14 +64,14 @@ class SliderDataGrid extends DataGrid 'title' => 'Edit Slider', 'method' => 'GET', 'route' => 'admin.sliders.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Slider', 'method' => 'POST', 'route' => 'admin.sliders.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php index c7c53269f..051fee2ac 100755 --- a/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxCategoryDataGrid.php @@ -32,7 +32,7 @@ class TaxCategoryDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class TaxCategoryDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -50,7 +50,7 @@ class TaxCategoryDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -59,14 +59,14 @@ class TaxCategoryDataGrid extends DataGrid 'title' => 'Edit Tax Category', 'method' => 'GET', 'route' => 'admin.tax-categories.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Tax Category', 'method' => 'POST', 'route' => 'admin.tax-categories.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php index a88a502f0..27561f038 100755 --- a/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/TaxRateDataGrid.php @@ -32,7 +32,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -41,7 +41,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -57,7 +57,7 @@ class TaxRateDataGrid extends DataGrid } else { return $value->state; } - } + }, ]); $this->addColumn([ @@ -66,7 +66,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -75,7 +75,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -84,7 +84,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -93,7 +93,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -102,7 +102,7 @@ class TaxRateDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -111,14 +111,14 @@ class TaxRateDataGrid extends DataGrid 'title' => 'Edit Tax Rate', 'method' => 'GET', 'route' => 'admin.tax-rates.store', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete Tax Rate', 'method' => 'POST', 'route' => 'admin.tax-rates.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php index f9d126269..393ea84f5 100755 --- a/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php @@ -19,7 +19,9 @@ class UserDataGrid extends DataGrid public function prepareQueryBuilder() { - $queryBuilder = DB::table('admins as u')->addSelect('u.id as user_id', 'u.name as user_name', 'u.status', 'u.email', 'ro.name as role_name')->leftJoin('roles as ro', 'u.role_id', '=', 'ro.id'); + $queryBuilder = DB::table('admins as u') + ->leftJoin('roles as ro', 'u.role_id', '=', 'ro.id') + ->addSelect('u.id as user_id', 'u.name as user_name', 'u.status', 'u.email', 'ro.name as role_name'); $this->addFilter('user_id', 'u.id'); $this->addFilter('user_name', 'u.name'); @@ -36,7 +38,7 @@ class UserDataGrid extends DataGrid 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -45,7 +47,7 @@ class UserDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -61,7 +63,7 @@ class UserDataGrid extends DataGrid } else { return 'Inactive'; } - } + }, ]); $this->addColumn([ @@ -70,7 +72,7 @@ class UserDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -79,7 +81,7 @@ class UserDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); } @@ -88,14 +90,14 @@ class UserDataGrid extends DataGrid 'title' => 'Edit User', 'method' => 'GET', 'route' => 'admin.users.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ 'title' => 'Delete User', 'method' => 'POST', 'route' => 'admin.users.delete', - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php b/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php index 10bc00c65..f95d442d2 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php @@ -136,22 +136,22 @@ class DashboardController extends Controller 'total_customers' => [ 'previous' => $previous = $this->getCustomersBetweenDates($this->lastStartDate, $this->lastEndDate)->count(), 'current' => $current = $this->getCustomersBetweenDates($this->startDate, $this->endDate)->count(), - 'progress' => $this->getPercentageChange($previous, $current) + 'progress' => $this->getPercentageChange($previous, $current), ], 'total_orders' => [ 'previous' => $previous = $this->previousOrders()->count(), 'current' => $current = $this->currentOrders()->count(), - 'progress' => $this->getPercentageChange($previous, $current) + 'progress' => $this->getPercentageChange($previous, $current), ], 'total_sales' => [ 'previous' => $previous = $this->previousOrders()->sum('base_grand_total_invoiced') - $this->previousOrders()->sum('base_grand_total_refunded'), 'current' => $current = $this->currentOrders()->sum('base_grand_total_invoiced') - $this->currentOrders()->sum('base_grand_total_refunded'), - 'progress' => $this->getPercentageChange($previous, $current) + 'progress' => $this->getPercentageChange($previous, $current), ], 'avg_sales' => [ 'previous' => $previous = $this->previousOrders()->avg('base_grand_total_invoiced') - $this->previousOrders()->avg('base_grand_total_refunded'), 'current' => $current = $this->currentOrders()->avg('base_grand_total_invoiced') - $this->currentOrders()->avg('base_grand_total_refunded'), - 'progress' => $this->getPercentageChange($previous, $current) + 'progress' => $this->getPercentageChange($previous, $current), ], 'top_selling_categories' => $this->getTopSellingCategories(), 'top_selling_products' => $this->getTopSellingProducts(), diff --git a/packages/Webkul/Admin/src/Http/Controllers/ExportController.php b/packages/Webkul/Admin/src/Http/Controllers/ExportController.php index 6b99db5df..7c83686d0 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/ExportController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/ExportController.php @@ -14,7 +14,14 @@ use Excel; class ExportController extends Controller { protected $exportableGrids = [ - 'OrderDataGrid', 'OrderInvoicesDataGrid', 'OrderShipmentsDataGrid', 'OrderRefundDataGrid', 'CustomerDataGrid', 'TaxRateDataGrid', 'ProductDataGrid', 'CMSPageDataGrid' + 'OrderDataGrid', + 'OrderInvoicesDataGrid', + 'OrderShipmentsDataGrid', + 'OrderRefundDataGrid', + 'CustomerDataGrid', + 'TaxRateDataGrid', + 'ProductDataGrid', + 'CMSPageDataGrid', ]; /** @@ -57,7 +64,7 @@ class ExportController extends Controller $records = $gridInstance->export(); - if (count($records) == 0) { + if (! count($records)) { session()->flash('warning', trans('admin::app.export.no-records')); return redirect()->back(); diff --git a/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php b/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php index 747fceda2..cf9d1b048 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Sales/RefundController.php @@ -108,7 +108,7 @@ class RefundController extends Controller } $this->validate(request(), [ - 'refund.items.*' => 'required|numeric|min:0' + 'refund.items.*' => 'required|numeric|min:0', ]); $data = request()->all(); diff --git a/packages/Webkul/Admin/src/Http/Requests/ConfigurationForm.php b/packages/Webkul/Admin/src/Http/Requests/ConfigurationForm.php index a20b641c7..4611ad6b5 100644 --- a/packages/Webkul/Admin/src/Http/Requests/ConfigurationForm.php +++ b/packages/Webkul/Admin/src/Http/Requests/ConfigurationForm.php @@ -30,7 +30,7 @@ class ConfigurationForm extends FormRequest && ! request()->input('general.design.admin_logo.logo_image.delete') ) { $this->rules = [ - 'general.design.admin_logo.logo_image' => 'required|mimes:jpeg,bmp,png,jpg' + 'general.design.admin_logo.logo_image' => 'required|mimes:jpeg,bmp,png,jpg', ]; } @@ -45,7 +45,7 @@ class ConfigurationForm extends FormRequest public function messages() { return [ - 'general.design.admin_logo.logo_image.mimes' => 'Invalid file format. Use only jpeg, bmp, png, jpg.' + 'general.design.admin_logo.logo_image.mimes' => 'Invalid file format. Use only jpeg, bmp, png, jpg.', ]; } } diff --git a/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php b/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php index 95a538780..507f8bcdf 100644 --- a/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php +++ b/packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php @@ -33,21 +33,21 @@ $factory->define(Attribute::class, function (Faker $faker, array $attributes) { } return [ - 'admin_name' => $faker->word, - 'code' => $faker->word, - 'type' => array_rand($types), - 'validation' => '', - 'position' => $faker->randomDigit, - 'is_required' => false, - 'is_unique' => false, - 'value_per_locale' => false, - 'value_per_channel' => false, - 'is_filterable' => false, - 'is_configurable' => false, - 'is_user_defined' => true, + 'admin_name' => $faker->word, + 'code' => $faker->word, + 'type' => array_rand($types), + 'validation' => '', + 'position' => $faker->randomDigit, + 'is_required' => false, + 'is_unique' => false, + 'value_per_locale' => false, + 'value_per_channel' => false, + 'is_filterable' => false, + 'is_configurable' => false, + 'is_user_defined' => true, 'is_visible_on_front' => true, - 'swatch_type' => null, - 'use_in_flat' => true, + 'swatch_type' => null, + 'use_in_flat' => true, ]; }); diff --git a/packages/Webkul/Attribute/src/Database/Seeders/AttributeFamilyTableSeeder.php b/packages/Webkul/Attribute/src/Database/Seeders/AttributeFamilyTableSeeder.php index 9926ecd3d..6f16f8f98 100755 --- a/packages/Webkul/Attribute/src/Database/Seeders/AttributeFamilyTableSeeder.php +++ b/packages/Webkul/Attribute/src/Database/Seeders/AttributeFamilyTableSeeder.php @@ -14,7 +14,13 @@ class AttributeFamilyTableSeeder extends Seeder DB::table('attribute_families')->delete(); DB::table('attribute_families')->insert([ - ['id' => '1','code' => 'default','name' => 'Default','status' => '0','is_user_defined' => '1'] + [ + 'id' => '1', + 'code' => 'default', + 'name' => 'Default', + 'status' => '0', + 'is_user_defined' => '1', + ] ]); DB::statement('SET FOREIGN_KEY_CHECKS=1;'); diff --git a/packages/Webkul/Attribute/src/Database/Seeders/AttributeGroupTableSeeder.php b/packages/Webkul/Attribute/src/Database/Seeders/AttributeGroupTableSeeder.php index 66815b0ab..bfa7f7b95 100755 --- a/packages/Webkul/Attribute/src/Database/Seeders/AttributeGroupTableSeeder.php +++ b/packages/Webkul/Attribute/src/Database/Seeders/AttributeGroupTableSeeder.php @@ -12,45 +12,151 @@ class AttributeGroupTableSeeder extends Seeder DB::statement('SET FOREIGN_KEY_CHECKS=0;'); DB::table('attribute_groups')->delete(); + DB::table('attribute_group_mappings')->delete(); DB::table('attribute_groups')->delete(); DB::table('attribute_groups')->insert([ - ['id' => '1', 'name' => 'General', 'position' => '1','is_user_defined' => '0','attribute_family_id' => '1'], - ['id' => '2', 'name' => 'Description', 'position' => '2','is_user_defined' => '0','attribute_family_id' => '1'], - ['id' => '3', 'name' => 'Meta Description' ,'position' => '3','is_user_defined' => '0','attribute_family_id' => '1'], - ['id' => '4', 'name' => 'Price', 'position' => '4','is_user_defined' => '0','attribute_family_id' => '1'], - ['id' => '5', 'name' => 'Shipping', 'position' => '5','is_user_defined' => '0','attribute_family_id' => '1'] + [ + 'id' => '1', + 'name' => 'General', + 'position' => '1', + 'is_user_defined' => '0', + 'attribute_family_id' => '1', + ], [ + 'id' => '2', + 'name' => 'Description', + 'position' => '2', + 'is_user_defined' => '0', + 'attribute_family_id' => '1', + ], [ + 'id' => '3', + 'name' => 'Meta Description', + 'position' => '3', + 'is_user_defined' => '0', + 'attribute_family_id' => '1', + ], [ + 'id' => '4', + 'name' => 'Price', + 'position' => '4', + 'is_user_defined' => '0', + 'attribute_family_id' => '1', + ], [ + 'id' => '5', + 'name' => 'Shipping', + 'position' => '5', + 'is_user_defined' => '0', + 'attribute_family_id' => '1' + ], ]); DB::table('attribute_group_mappings')->insert([ - ['attribute_id' => '1', 'attribute_group_id' => '1', 'position' => '1'], - ['attribute_id' => '2', 'attribute_group_id' => '1', 'position' => '2'], - ['attribute_id' => '3', 'attribute_group_id' => '1', 'position' => '3'], - ['attribute_id' => '4', 'attribute_group_id' => '1', 'position' => '4'], - ['attribute_id' => '5', 'attribute_group_id' => '1', 'position' => '5'], - ['attribute_id' => '6', 'attribute_group_id' => '1', 'position' => '6'], - ['attribute_id' => '7', 'attribute_group_id' => '1', 'position' => '7'], - ['attribute_id' => '8', 'attribute_group_id' => '1', 'position' => '8'], - ['attribute_id' => '9', 'attribute_group_id' => '2', 'position' => '1'], - ['attribute_id' => '10', 'attribute_group_id' => '2', 'position' => '2'], - ['attribute_id' => '11', 'attribute_group_id' => '4', 'position' => '1'], - ['attribute_id' => '12', 'attribute_group_id' => '4', 'position' => '2'], - ['attribute_id' => '13', 'attribute_group_id' => '4', 'position' => '3'], - ['attribute_id' => '14', 'attribute_group_id' => '4', 'position' => '4'], - ['attribute_id' => '15', 'attribute_group_id' => '4', 'position' => '5'], - ['attribute_id' => '16', 'attribute_group_id' => '3', 'position' => '1'], - ['attribute_id' => '17', 'attribute_group_id' => '3', 'position' => '2'], - ['attribute_id' => '18', 'attribute_group_id' => '3', 'position' => '3'], - ['attribute_id' => '19', 'attribute_group_id' => '5', 'position' => '1'], - ['attribute_id' => '20', 'attribute_group_id' => '5', 'position' => '2'], - ['attribute_id' => '21', 'attribute_group_id' => '5', 'position' => '3'], - ['attribute_id' => '22', 'attribute_group_id' => '5', 'position' => '4'], - ['attribute_id' => '23', 'attribute_group_id' => '1', 'position' => '10'], - ['attribute_id' => '24', 'attribute_group_id' => '1', 'position' => '11'], - ['attribute_id' => '25', 'attribute_group_id' => '1', 'position' => '12'], - ['attribute_id' => '26', 'attribute_group_id' => '1', 'position' => '9'] + [ + 'attribute_id' => '1', + 'attribute_group_id' => '1', + 'position' => '1', + ], [ + 'attribute_id' => '2', + 'attribute_group_id' => '1', + 'position' => '2', + ], [ + 'attribute_id' => '3', + 'attribute_group_id' => '1', + 'position' => '3', + ], [ + 'attribute_id' => '4', + 'attribute_group_id' => '1', + 'position' => '4', + ], [ + 'attribute_id' => '5', + 'attribute_group_id' => '1', + 'position' => '5', + ], [ + 'attribute_id' => '6', + 'attribute_group_id' => '1', + 'position' => '6', + ], [ + 'attribute_id' => '7', + 'attribute_group_id' => '1', + 'position' => '7', + ], [ + 'attribute_id' => '8', + 'attribute_group_id' => '1', + 'position' => '8', + ], [ + 'attribute_id' => '9', + 'attribute_group_id' => '2', + 'position' => '1', + ], [ + 'attribute_id' => '10', + 'attribute_group_id' => '2', + 'position' => '2', + ], [ + 'attribute_id' => '11', + 'attribute_group_id' => '4', + 'position' => '1', + ], [ + 'attribute_id' => '12', + 'attribute_group_id' => '4', + 'position' => '2', + ], [ + 'attribute_id' => '13', + 'attribute_group_id' => '4', + 'position' => '3', + ], [ + 'attribute_id' => '14', + 'attribute_group_id' => '4', + 'position' => '4', + ], [ + 'attribute_id' => '15', + 'attribute_group_id' => '4', + 'position' => '5', + ], [ + 'attribute_id' => '16', + 'attribute_group_id' => '3', + 'position' => '1', + ], [ + 'attribute_id' => '17', + 'attribute_group_id' => '3', + 'position' => '2', + ], [ + 'attribute_id' => '18', + 'attribute_group_id' => '3', + 'position' => '3', + ], [ + 'attribute_id' => '19', + 'attribute_group_id' => '5', + 'position' => '1', + ], [ + 'attribute_id' => '20', + 'attribute_group_id' => '5', + 'position' => '2', + ], [ + 'attribute_id' => '21', + 'attribute_group_id' => '5', + 'position' => '3', + ], [ + 'attribute_id' => '22', + 'attribute_group_id' => '5', + 'position' => '4', + ], [ + 'attribute_id' => '23', + 'attribute_group_id' => '1', + 'position' => '10', + ], [ + 'attribute_id' => '24', + 'attribute_group_id' => '1', + 'position' => '11', + ], [ + 'attribute_id' => '25', + 'attribute_group_id' => '1', + 'position' => '12', + ], [ + 'attribute_id' => '26', + 'attribute_group_id' => '1', + 'position' => '9', + ] ]); DB::statement('SET FOREIGN_KEY_CHECKS=0;'); diff --git a/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php b/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php index 7f3b1e7ca..9fcf3dbfd 100755 --- a/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php +++ b/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php @@ -11,30 +11,105 @@ class AttributeOptionTableSeeder extends Seeder public function run() { DB::table('attribute_options')->delete(); + DB::table('attribute_option_translations')->delete(); DB::table('attribute_options')->insert([ - ['id' => '1', 'admin_name' => 'Red', 'sort_order' => '1', 'attribute_id' => '23'], - ['id' => '2', 'admin_name' => 'Green', 'sort_order' => '2', 'attribute_id' => '23'], - ['id' => '3', 'admin_name' => 'Yellow', 'sort_order' => '3', 'attribute_id' => '23'], - ['id' => '4', 'admin_name' => 'Black', 'sort_order' => '4', 'attribute_id' => '23'], - ['id' => '5', 'admin_name' => 'White', 'sort_order' => '5', 'attribute_id' => '23'], - ['id' => '6', 'admin_name' => 'S', 'sort_order' => '1', 'attribute_id' => '24'], - ['id' => '7', 'admin_name' => 'M', 'sort_order' => '2', 'attribute_id' => '24'], - ['id' => '8', 'admin_name' => 'L', 'sort_order' => '3', 'attribute_id' => '24'], - ['id' => '9', 'admin_name' => 'XL', 'sort_order' => '4', 'attribute_id' => '24'] + [ + 'id' => '1', + 'admin_name' => 'Red', + 'sort_order' => '1', + 'attribute_id' => '23', + ], [ + 'id' => '2', + 'admin_name' => 'Green', + 'sort_order' => '2', + 'attribute_id' => '23', + ], [ + 'id' => '3', + 'admin_name' => 'Yellow', + 'sort_order' => '3', + 'attribute_id' => '23', + ], [ + 'id' => '4', + 'admin_name' => 'Black', + 'sort_order' => '4', + 'attribute_id' => '23', + ], [ + 'id' => '5', + 'admin_name' => 'White', + 'sort_order' => '5', + 'attribute_id' => '23', + ], [ + 'id' => '6', + 'admin_name' => 'S', + 'sort_order' => '1', + 'attribute_id' => '24', + ], [ + 'id' => '7', + 'admin_name' => 'M', + 'sort_order' => '2', + 'attribute_id' => '24', + ], [ + 'id' => '8', + 'admin_name' => 'L', + 'sort_order' => '3', + 'attribute_id' => '24', + ], [ + 'id' => '9', + 'admin_name' => 'XL', + 'sort_order' => '4', + 'attribute_id' => '24', + ] ]); DB::table('attribute_option_translations')->insert([ - ['id' => '1', 'locale' => 'en', 'label' => 'Red', 'attribute_option_id' => '1'], - ['id' => '2', 'locale' => 'en', 'label' => 'Green', 'attribute_option_id' => '2'], - ['id' => '3', 'locale' => 'en', 'label' => 'Yellow', 'attribute_option_id' => '3'], - ['id' => '4', 'locale' => 'en', 'label' => 'Black', 'attribute_option_id' => '4'], - ['id' => '5', 'locale' => 'en', 'label' => 'White', 'attribute_option_id' => '5'], - ['id' => '6', 'locale' => 'en', 'label' => 'S', 'attribute_option_id' => '6'], - ['id' => '7', 'locale' => 'en', 'label' => 'M', 'attribute_option_id' => '7'], - ['id' => '8', 'locale' => 'en', 'label' => 'L', 'attribute_option_id' => '8'], - ['id' => '9', 'locale' => 'en', 'label' => 'XL', 'attribute_option_id' => '9'] + [ + 'id' => '1', + 'locale' => 'en', + 'label' => 'Red', + 'attribute_option_id' => '1', + ], [ + 'id' => '2', + 'locale' => 'en', + 'label' => 'Green', + 'attribute_option_id' => '2', + ], [ + 'id' => '3', + 'locale' => 'en', + 'label' => 'Yellow', + 'attribute_option_id' => '3', + ], [ + 'id' => '4', + 'locale' => 'en', + 'label' => 'Black', + 'attribute_option_id' => '4', + ], [ + 'id' => '5', + 'locale' => 'en', + 'label' => 'White', + 'attribute_option_id' => '5', + ], [ + 'id' => '6', + 'locale' => 'en', + 'label' => 'S', + 'attribute_option_id' => '6', + ], [ + 'id' => '7', + 'locale' => 'en', + 'label' => 'M', + 'attribute_option_id' => '7', + ], [ + 'id' => '8', + 'locale' => 'en', + 'label' => 'L', + 'attribute_option_id' => '8', + ], [ + 'id' => '9', + 'locale' => 'en', + 'label' => 'XL', + 'attribute_option_id' => '9', + ] ]); } } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php b/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php index 82862d16c..b56a2c13b 100755 --- a/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php +++ b/packages/Webkul/Attribute/src/Http/Controllers/AttributeController.php @@ -70,7 +70,7 @@ class AttributeController extends Controller $this->validate(request(), [ 'code' => ['required', 'unique:attributes,code', new \Webkul\Core\Contracts\Validations\Code], 'admin_name' => 'required', - 'type' => 'required' + 'type' => 'required', ]); $data = request()->all(); @@ -108,7 +108,7 @@ class AttributeController extends Controller $this->validate(request(), [ 'code' => ['required', 'unique:attributes,code,' . $id, new \Webkul\Core\Contracts\Validations\Code], 'admin_name' => 'required', - 'type' => 'required' + 'type' => 'required', ]); $attribute = $this->attributeRepository->update(request()->all(), $id); @@ -163,8 +163,8 @@ class AttributeController extends Controller try { if ($attribute->is_user_defined) { $suppressFlash = true; + $this->attributeRepository->delete($value); - } else { session()->flash('error', trans('admin::app.response.user-define-error', ['name' => 'Attribute'])); } diff --git a/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php b/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php index b0d50addc..205e605a8 100755 --- a/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php +++ b/packages/Webkul/Attribute/src/Http/Controllers/AttributeFamilyController.php @@ -86,7 +86,7 @@ class AttributeFamilyController extends Controller { $this->validate(request(), [ 'code' => ['required', 'unique:attribute_families,code', new \Webkul\Core\Contracts\Validations\Code], - 'name' => 'required' + 'name' => 'required', ]); $attributeFamily = $this->attributeFamilyRepository->create(request()->all()); @@ -121,7 +121,7 @@ class AttributeFamilyController extends Controller { $this->validate(request(), [ 'code' => ['required', 'unique:attribute_families,code,' . $id, new \Webkul\Core\Contracts\Validations\Code], - 'name' => 'required' + 'name' => 'required', ]); $attributeFamily = $this->attributeFamilyRepository->update(request()->all(), $id); @@ -185,7 +185,7 @@ class AttributeFamilyController extends Controller } } - if (!$suppressFlash) { + if (! $suppressFlash) { session()->flash('success', ('admin::app.datagrid.mass-ops.delete-success')); } else { session()->flash('info', trans('admin::app.datagrid.mass-ops.partial-action', ['resource' => 'Attribute Family'])); diff --git a/packages/Webkul/Attribute/src/Models/AttributeOption.php b/packages/Webkul/Attribute/src/Models/AttributeOption.php index 096924aa5..4b86e6abf 100755 --- a/packages/Webkul/Attribute/src/Models/AttributeOption.php +++ b/packages/Webkul/Attribute/src/Models/AttributeOption.php @@ -12,7 +12,12 @@ class AttributeOption extends TranslatableModel implements AttributeOptionContra public $translatedAttributes = ['label']; - protected $fillable = ['admin_name', 'swatch_value', 'sort_order', 'attribute_id']; + protected $fillable = [ + 'admin_name', + 'swatch_value', + 'sort_order', + 'attribute_id', + ]; /** * Get the attribute that owns the attribute option. diff --git a/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php b/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php index 72a4daea1..6fa64e726 100755 --- a/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php +++ b/packages/Webkul/Attribute/src/Providers/AttributeServiceProvider.php @@ -18,14 +18,4 @@ class AttributeServiceProvider extends ServiceProvider $this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories'); } - - /** - * Register services. - * - * @return void - */ - public function register() - { - - } } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php index e53245904..f35468c60 100755 --- a/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php +++ b/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php @@ -176,7 +176,7 @@ class AttributeFamilyRepository extends Repository $trimmed[$key] = [ 'id' => $attributeFamily->id, 'code' => $attributeFamily->code, - 'name' => $attributeFamily->name + 'name' => $attributeFamily->name, ]; } } diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeOptionRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeOptionRepository.php index 099fe2635..aadffee0d 100755 --- a/packages/Webkul/Attribute/src/Repositories/AttributeOptionRepository.php +++ b/packages/Webkul/Attribute/src/Repositories/AttributeOptionRepository.php @@ -64,7 +64,7 @@ class AttributeOptionRepository extends Repository if ($data['swatch_value'] instanceof \Illuminate\Http\UploadedFile) { parent::update([ - 'swatch_value' => $data['swatch_value']->store('attribute_option') + 'swatch_value' => $data['swatch_value']->store('attribute_option'), ], $optionId); } } diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php index 61350100e..be7da949f 100755 --- a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php +++ b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php @@ -68,7 +68,7 @@ class AttributeRepository extends Repository if (in_array($attribute->type, ['select', 'multiselect', 'checkbox']) && count($options)) { foreach ($options as $optionInputs) { $this->attributeOptionRepository->create(array_merge([ - 'attribute_id' => $attribute->id + 'attribute_id' => $attribute->id, ], $optionInputs)); } } @@ -182,7 +182,7 @@ class AttributeRepository extends Repository 'special_price', 'special_price_from', 'special_price_to', - 'status' + 'status', ], $attributeColumns); if (in_array('*', $codes)) { @@ -242,7 +242,7 @@ class AttributeRepository extends Repository 'type' => $attribute->type, 'code' => $attribute->code, 'has_options' => true, - 'options' => $attribute->options + 'options' => $attribute->options, ]); } else { array_push($trimmed, [ @@ -251,7 +251,7 @@ class AttributeRepository extends Repository 'type' => $attribute->type, 'code' => $attribute->code, 'has_options' => false, - 'options' => null + 'options' => null, ]); } diff --git a/packages/Webkul/BookingProduct/src/Config/product_types.php b/packages/Webkul/BookingProduct/src/Config/product_types.php index e38c92747..b480d2f96 100644 --- a/packages/Webkul/BookingProduct/src/Config/product_types.php +++ b/packages/Webkul/BookingProduct/src/Config/product_types.php @@ -5,6 +5,6 @@ return [ 'key' => 'booking', 'name' => 'Booking', 'class' => 'Webkul\BookingProduct\Type\Booking', - 'sort' => 7 + 'sort' => 7, ] ]; \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Http/Controllers/Shop/BookingProductController.php b/packages/Webkul/BookingProduct/src/Http/Controllers/Shop/BookingProductController.php index ee5b0ff54..6b1a0a23f 100644 --- a/packages/Webkul/BookingProduct/src/Http/Controllers/Shop/BookingProductController.php +++ b/packages/Webkul/BookingProduct/src/Http/Controllers/Shop/BookingProductController.php @@ -72,7 +72,7 @@ class BookingProductController extends Controller $bookingProduct = $this->bookingProductRepository->find(request('id')); return response()->json([ - 'data' => $this->bookingHelpers[$bookingProduct->type]->getSlotsByDate($bookingProduct, request()->get('date')) + 'data' => $this->bookingHelpers[$bookingProduct->type]->getSlotsByDate($bookingProduct, request()->get('date')), ]); } } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductAppointmentSlot.php b/packages/Webkul/BookingProduct/src/Models/BookingProductAppointmentSlot.php index d1e2efcce..c87721ab2 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductAppointmentSlot.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductAppointmentSlot.php @@ -11,5 +11,11 @@ class BookingProductAppointmentSlot extends Model implements BookingProductAppoi protected $casts = ['slots' => 'array']; - protected $fillable = ['duration', 'break_time', 'same_slot_all_days', 'slots', 'booking_product_id']; + protected $fillable = [ + 'duration', + 'break_time', + 'same_slot_all_days', + 'slots', + 'booking_product_id', + ]; } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductDefaultSlot.php b/packages/Webkul/BookingProduct/src/Models/BookingProductDefaultSlot.php index 873ff2f8a..bb264d7b8 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductDefaultSlot.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductDefaultSlot.php @@ -13,7 +13,13 @@ class BookingProductDefaultSlot extends Model implements BookingProductDefaultSl protected $casts = ['slots' => 'array']; - protected $fillable = ['booking_type', 'duration', 'break_time', 'slots', 'booking_product_id']; + protected $fillable = [ + 'booking_type', + 'duration', + 'break_time', + 'slots', + 'booking_product_id' + ]; /** * Get the product that owns the attribute value. diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php index f9d5feac2..45be2194b 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicket.php @@ -11,5 +11,9 @@ class BookingProductEventTicket extends TranslatableModel implements BookingProd public $translatedAttributes = ['name', 'description']; - protected $fillable = ['price', 'qty', 'booking_product_id']; + protected $fillable = [ + 'price', + 'qty', + 'booking_product_id', + ]; } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicketTranslation.php b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicketTranslation.php index fe46149ea..9f74b06cf 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicketTranslation.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductEventTicketTranslation.php @@ -9,5 +9,8 @@ class BookingProductEventTicketTranslation extends Model implements BookingProdu { public $timestamps = false; - protected $fillable = ['name', 'description']; + protected $fillable = [ + 'name', + 'description', + ]; } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Models/BookingProductRentalSlot.php b/packages/Webkul/BookingProduct/src/Models/BookingProductRentalSlot.php index fa7405b81..e2645d1d2 100644 --- a/packages/Webkul/BookingProduct/src/Models/BookingProductRentalSlot.php +++ b/packages/Webkul/BookingProduct/src/Models/BookingProductRentalSlot.php @@ -11,5 +11,12 @@ class BookingProductRentalSlot extends Model implements BookingProductRentalSlot protected $casts = ['slots' => 'array']; - protected $fillable = ['renting_type', 'daily_price', 'hourly_price', 'same_slot_all_days', 'slots', 'booking_product_id']; + protected $fillable = [ + 'renting_type', + 'daily_price', + 'hourly_price', + 'same_slot_all_days', + 'slots', + 'booking_product_id', + ]; } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Providers/ModuleServiceProvider.php b/packages/Webkul/BookingProduct/src/Providers/ModuleServiceProvider.php index 8da297a24..7e121b3bc 100644 --- a/packages/Webkul/BookingProduct/src/Providers/ModuleServiceProvider.php +++ b/packages/Webkul/BookingProduct/src/Providers/ModuleServiceProvider.php @@ -14,6 +14,6 @@ class ModuleServiceProvider extends BaseModuleServiceProvider \Webkul\BookingProduct\Models\BookingProductEventTicketTranslation::class, \Webkul\BookingProduct\Models\BookingProductRentalSlot::class, \Webkul\BookingProduct\Models\BookingProductTableSlot::class, - \Webkul\BookingProduct\Models\Booking::class + \Webkul\BookingProduct\Models\Booking::class, ]; } \ No newline at end of file diff --git a/packages/Webkul/BookingProduct/src/Type/Booking.php b/packages/Webkul/BookingProduct/src/Type/Booking.php index d14c1288b..73be09f6d 100644 --- a/packages/Webkul/BookingProduct/src/Type/Booking.php +++ b/packages/Webkul/BookingProduct/src/Type/Booking.php @@ -42,7 +42,7 @@ class Booking extends Virtual 'admin::catalog.products.accordians.categories', 'admin::catalog.products.accordians.channels', 'bookingproduct::admin.catalog.products.accordians.booking', - 'admin::catalog.products.accordians.product-links' + 'admin::catalog.products.accordians.product-links', ]; /** @@ -100,7 +100,7 @@ class Booking extends Virtual $this->bookingProductRepository->update(request('booking'), $bookingProduct->id); } else { $this->bookingProductRepository->create(array_merge(request('booking'), [ - 'product_id' => $id + 'product_id' => $id, ])); } } diff --git a/packages/Webkul/CMS/src/Database/Seeders/CMSPagesTableSeeder.php b/packages/Webkul/CMS/src/Database/Seeders/CMSPagesTableSeeder.php index 92430ab43..9dbe3942b 100644 --- a/packages/Webkul/CMS/src/Database/Seeders/CMSPagesTableSeeder.php +++ b/packages/Webkul/CMS/src/Database/Seeders/CMSPagesTableSeeder.php @@ -15,99 +15,87 @@ class CMSPagesTableSeeder extends Seeder DB::table('cms_pages')->insert([ [ - 'id' => 1, + 'id' => 1, 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'updated_at' => Carbon::now(), ], [ - 'id' => 2, + 'id' => 2, 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'updated_at' => Carbon::now(), ], [ - 'id' => 3, + 'id' => 3, 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'updated_at' => Carbon::now(), ], [ - 'id' => 4, + 'id' => 4, 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'updated_at' => Carbon::now(), ], [ - 'id' => 5, + 'id' => 5, 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'updated_at' => Carbon::now(), ], [ - 'id' => 6, + 'id' => 6, 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'updated_at' => Carbon::now(), ] ]); DB::table('cms_page_translations')->insert([ [ - 'locale' => 'en', - 'cms_page_id' => 1, - 'url_key' => 'about-us', - 'html_content' => '
-
About us page content
-
', - 'page_title' => 'About Us', - 'meta_title' => 'about us', + 'locale' => 'en', + 'cms_page_id' => 1, + 'url_key' => 'about-us', + 'html_content' => '
About us page content
', + 'page_title' => 'About Us', + 'meta_title' => 'about us', 'meta_description' => '', - 'meta_keywords' => 'aboutus' + 'meta_keywords' => 'aboutus', ], [ - 'locale' => 'en', - 'cms_page_id' => 2, - 'url_key' => 'return-policy', - 'html_content' => '
-
Return policy page content
-
', - 'page_title' => 'Return Policy', - 'meta_title' => 'return policy', + 'locale' => 'en', + 'cms_page_id' => 2, + 'url_key' => 'return-policy', + 'html_content' => '
Return policy page content
', + 'page_title' => 'Return Policy', + 'meta_title' => 'return policy', 'meta_description' => '', - 'meta_keywords' => 'return, policy' + 'meta_keywords' => 'return, policy', ], [ - 'locale' => 'en', - 'cms_page_id' => 3, - 'url_key' => 'refund-policy', - 'html_content' => '
-
Refund policy page content
-
', - 'page_title' => 'Refund Policy', - 'meta_title' => 'Refund policy', + 'locale' => 'en', + 'cms_page_id' => 3, + 'url_key' => 'refund-policy', + 'html_content' => '
Refund policy page content
', + 'page_title' => 'Refund Policy', + 'meta_title' => 'Refund policy', 'meta_description' => '', - 'meta_keywords' => 'refund, policy' + 'meta_keywords' => 'refund, policy', ], [ - 'locale' => 'en', - 'cms_page_id' => 4, - 'url_key' => 'terms-conditions', - 'html_content' => '
-
Terms & conditions page content
-
', - 'page_title' => 'Terms & Conditions', - 'meta_title' => 'Terms & Conditions', + 'locale' => 'en', + 'cms_page_id' => 4, + 'url_key' => 'terms-conditions', + 'html_content' => '
Terms & conditions page content
', + 'page_title' => 'Terms & Conditions', + 'meta_title' => 'Terms & Conditions', 'meta_description' => '', - 'meta_keywords' => 'term, conditions' + 'meta_keywords' => 'term, conditions', ], [ - 'locale' => 'en', - 'cms_page_id' => 5, - 'url_key' => 'terms-of-use', - 'html_content' => '
-
Terms of use page content
-
', - 'page_title' => 'Terms of use', - 'meta_title' => 'Terms of use', + 'locale' => 'en', + 'cms_page_id' => 5, + 'url_key' => 'terms-of-use', + 'html_content' => '
Terms of use page content
', + 'page_title' => 'Terms of use', + 'meta_title' => 'Terms of use', 'meta_description' => '', - 'meta_keywords' => 'term, use' + 'meta_keywords' => 'term, use', ], [ - 'locale' => 'en', - 'cms_page_id' => 6, - 'url_key' => 'contact-us', - 'html_content' => '
-
Contact us page content
-
', - 'page_title' => 'Contact Us', - 'meta_title' => 'Contact Us', + 'locale' => 'en', + 'cms_page_id' => 6, + 'url_key' => 'contact-us', + 'html_content' => '
Contact us page content
', + 'page_title' => 'Contact Us', + 'meta_title' => 'Contact Us', 'meta_description' => '', - 'meta_keywords' => 'contact, us' + 'meta_keywords' => 'contact, us', ] ]); } diff --git a/packages/Webkul/CMS/src/Http/Controllers/Admin/PageController.php b/packages/Webkul/CMS/src/Http/Controllers/Admin/PageController.php index 32617b285..e93d89b65 100644 --- a/packages/Webkul/CMS/src/Http/Controllers/Admin/PageController.php +++ b/packages/Webkul/CMS/src/Http/Controllers/Admin/PageController.php @@ -75,7 +75,7 @@ use Webkul\CMS\Repositories\CmsRepository; 'url_key' => ['required', 'unique:cms_page_translations,url_key', new \Webkul\Core\Contracts\Validations\Slug], 'page_title' => 'required', 'channels' => 'required', - 'html_content' => 'required' + 'html_content' => 'required', ]); $page = $this->cmsRepository->create(request()->all()); @@ -116,7 +116,7 @@ use Webkul\CMS\Repositories\CmsRepository; }], $locale . '.page_title' => 'required', $locale . '.html_content' => 'required', - 'channels' => 'required' + 'channels' => 'required', ]); $this->cmsRepository->update(request()->all(), $id); @@ -174,11 +174,11 @@ use Webkul\CMS\Repositories\CmsRepository; if (count($pageIDs) == $count) { session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success', [ - 'resource' => 'CMS Pages' + 'resource' => 'CMS Pages', ])); } else { session()->flash('success', trans('admin::app.datagrid.mass-ops.partial-action', [ - 'resource' => 'CMS Pages' + 'resource' => 'CMS Pages', ])); } } else { diff --git a/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php b/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php index 478ecab57..32165d15b 100644 --- a/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/CartRule/src/Http/Controllers/CartRuleController.php @@ -93,7 +93,7 @@ class CartRuleController extends Controller 'starts_from' => 'nullable|date', 'ends_till' => 'nullable|date|after_or_equal:starts_from', 'action_type' => 'required', - 'discount_amount' => 'required|numeric' + 'discount_amount' => 'required|numeric', ]); $data = request()->all(); @@ -143,7 +143,7 @@ class CartRuleController extends Controller 'starts_from' => 'nullable|date', 'ends_till' => 'nullable|date|after_or_equal:starts_from', 'action_type' => 'required', - 'discount_amount' => 'required|numeric' + 'discount_amount' => 'required|numeric', ]); $cartRule = $this->cartRuleRepository->findOrFail($id); diff --git a/packages/Webkul/CartRule/src/Listeners/Order.php b/packages/Webkul/CartRule/src/Listeners/Order.php index eafa26298..7e521c062 100755 --- a/packages/Webkul/CartRule/src/Listeners/Order.php +++ b/packages/Webkul/CartRule/src/Listeners/Order.php @@ -99,7 +99,7 @@ class Order $ruleCustomer = $this->cartRuleCustomerRepository->findOneWhere([ 'customer_id' => $order->customer_id, - 'cart_rule_id' => $ruleId + 'cart_rule_id' => $ruleId, ]); if ($ruleCustomer) { @@ -108,7 +108,7 @@ class Order $this->cartRuleCustomerRepository->create([ 'customer_id' => $order->customer_id, 'cart_rule_id' => $ruleId, - 'times_used' => 1 + 'times_used' => 1, ]); } } @@ -125,7 +125,7 @@ class Order if ($order->customer_id) { $couponUsage = $this->cartRuleCouponUsageRepository->findOneWhere([ 'customer_id' => $order->customer_id, - 'cart_rule_coupon_id' => $coupon->id + 'cart_rule_coupon_id' => $coupon->id, ]); if ($couponUsage) { @@ -134,7 +134,7 @@ class Order $this->cartRuleCouponUsageRepository->create([ 'customer_id' => $order->customer_id, 'cart_rule_coupon_id' => $coupon->id, - 'times_used' => 1 + 'times_used' => 1, ]); } } diff --git a/packages/Webkul/CartRule/src/Models/CartRuleCouponUsage.php b/packages/Webkul/CartRule/src/Models/CartRuleCouponUsage.php index dd249ed91..d627d0166 100644 --- a/packages/Webkul/CartRule/src/Models/CartRuleCouponUsage.php +++ b/packages/Webkul/CartRule/src/Models/CartRuleCouponUsage.php @@ -11,5 +11,8 @@ class CartRuleCouponUsage extends Model implements CartRuleCouponUsageContract protected $table = 'cart_rule_coupon_usage'; - protected $guarded = ['created_at', 'updated_at']; + protected $guarded = [ + 'created_at', + 'updated_at', + ]; } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Models/CartRuleCustomer.php b/packages/Webkul/CartRule/src/Models/CartRuleCustomer.php index b773cf2ea..b2d9f9bc4 100644 --- a/packages/Webkul/CartRule/src/Models/CartRuleCustomer.php +++ b/packages/Webkul/CartRule/src/Models/CartRuleCustomer.php @@ -9,5 +9,9 @@ class CartRuleCustomer extends Model implements CartRuleCustomerContract { public $timestamps = false; - protected $fillable = ['times_used', 'cart_rule_id', 'customer_id']; + protected $fillable = [ + 'times_used', + 'cart_rule_id', + 'customer_id', + ]; } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Providers/CartRuleServiceProvider.php b/packages/Webkul/CartRule/src/Providers/CartRuleServiceProvider.php index b4fed5b89..7a59d7656 100644 --- a/packages/Webkul/CartRule/src/Providers/CartRuleServiceProvider.php +++ b/packages/Webkul/CartRule/src/Providers/CartRuleServiceProvider.php @@ -18,13 +18,4 @@ class CartRuleServiceProvider extends ServiceProvider $this->app->register(EventServiceProvider::class); } - - /** - * Register services. - * - * @return void - */ - public function register() - { - } } \ No newline at end of file diff --git a/packages/Webkul/CartRule/src/Repositories/CartRuleCouponRepository.php b/packages/Webkul/CartRule/src/Repositories/CartRuleCouponRepository.php index 2009919a7..ef6ac1dda 100755 --- a/packages/Webkul/CartRule/src/Repositories/CartRuleCouponRepository.php +++ b/packages/Webkul/CartRule/src/Repositories/CartRuleCouponRepository.php @@ -18,7 +18,7 @@ class CartRuleCouponRepository extends Repository protected $charsets = [ 'alphanumeric' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 'alphabetical' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', - 'numeric' => '0123456789' + 'numeric' => '0123456789', ]; /** @@ -49,7 +49,7 @@ class CartRuleCouponRepository extends Repository 'usage_limit' => $cartRule->uses_per_coupon ?? 0, 'usage_per_customer' => $cartRule->usage_per_customer ?? 0, 'is_primary' => 0, - 'expired_at' => $cartRule->ends_till ?: null + 'expired_at' => $cartRule->ends_till ?: null, ]); } } diff --git a/packages/Webkul/CartRule/src/Repositories/CartRuleRepository.php b/packages/Webkul/CartRule/src/Repositories/CartRuleRepository.php index b541518d4..1d3e217a2 100755 --- a/packages/Webkul/CartRule/src/Repositories/CartRuleRepository.php +++ b/packages/Webkul/CartRule/src/Repositories/CartRuleRepository.php @@ -144,7 +144,7 @@ class CartRuleRepository extends Repository 'usage_limit' => $data['usage_per_customer'] ?? 0, 'usage_per_customer' => $data['usage_per_customer'] ?? 0, 'is_primary' => 1, - 'expired_at' => $data['ends_till'] ?: null + 'expired_at' => $data['ends_till'] ?: null, ]); } @@ -184,7 +184,7 @@ class CartRuleRepository extends Repository 'code' => $data['coupon_code'], 'usage_limit' => $data['uses_per_coupon'] ?? 0, 'usage_per_customer' => $data['usage_per_customer'] ?? 0, - 'expired_at' => $data['ends_till'] ?: null + 'expired_at' => $data['ends_till'] ?: null, ], $cartRuleCoupon->id); } else { $this->cartRuleCouponRepository->create([ @@ -193,7 +193,7 @@ class CartRuleRepository extends Repository 'usage_limit' => $data['uses_per_coupon'] ?? 0, 'usage_per_customer' => $data['usage_per_customer'] ?? 0, 'is_primary' => 1, - 'expired_at' => $data['ends_till'] ?: null + 'expired_at' => $data['ends_till'] ?: null, ]); } } else { @@ -202,7 +202,7 @@ class CartRuleRepository extends Repository $this->cartRuleCouponRepository->getModel()->where('cart_rule_id', $cartRule->id)->update([ 'usage_limit' => $data['uses_per_coupon'] ?? 0, 'usage_per_customer' => $data['usage_per_customer'] ?? 0, - 'expired_at' => $data['ends_till'] ?: null + 'expired_at' => $data['ends_till'] ?: null, ]); } } else { @@ -227,35 +227,35 @@ class CartRuleRepository extends Repository [ 'key' => 'cart|base_sub_total', 'type' => 'price', - 'label' => trans('admin::app.promotions.cart-rules.subtotal') + 'label' => trans('admin::app.promotions.cart-rules.subtotal'), ], [ 'key' => 'cart|items_qty', 'type' => 'integer', - 'label' => trans('admin::app.promotions.cart-rules.total-items-qty') + 'label' => trans('admin::app.promotions.cart-rules.total-items-qty'), ], [ 'key' => 'cart|payment_method', 'type' => 'select', 'options' => $this->getPaymentMethods(), - 'label' => trans('admin::app.promotions.cart-rules.payment-method') + 'label' => trans('admin::app.promotions.cart-rules.payment-method'), ], [ 'key' => 'cart|shipping_method', 'type' => 'select', 'options' => $this->getShippingMethods(), - 'label' => trans('admin::app.promotions.cart-rules.shipping-method') + 'label' => trans('admin::app.promotions.cart-rules.shipping-method'), ], [ 'key' => 'cart|postcode', 'type' => 'text', - 'label' => trans('admin::app.promotions.cart-rules.shipping-postcode') + 'label' => trans('admin::app.promotions.cart-rules.shipping-postcode'), ], [ 'key' => 'cart|state', 'type' => 'select', 'options' => $this->groupedStatesByCountries(), - 'label' => trans('admin::app.promotions.cart-rules.shipping-state') + 'label' => trans('admin::app.promotions.cart-rules.shipping-state'), ], [ 'key' => 'cart|country', 'type' => 'select', 'options' => $this->getCountries(), - 'label' => trans('admin::app.promotions.cart-rules.shipping-country') + 'label' => trans('admin::app.promotions.cart-rules.shipping-country'), ] ] ], [ @@ -265,19 +265,19 @@ class CartRuleRepository extends Repository [ 'key' => 'cart_item|base_price', 'type' => 'price', - 'label' => trans('admin::app.promotions.cart-rules.price-in-cart') + 'label' => trans('admin::app.promotions.cart-rules.price-in-cart'), ], [ 'key' => 'cart_item|quantity', 'type' => 'integer', - 'label' => trans('admin::app.promotions.cart-rules.qty-in-cart') + 'label' => trans('admin::app.promotions.cart-rules.qty-in-cart'), ], [ 'key' => 'cart_item|base_total_weight', 'type' => 'decimal', - 'label' => trans('admin::app.promotions.cart-rules.total-weight') + 'label' => trans('admin::app.promotions.cart-rules.total-weight'), ], [ 'key' => 'cart_item|base_total', 'type' => 'price', - 'label' => trans('admin::app.promotions.cart-rules.subtotal') + 'label' => trans('admin::app.promotions.cart-rules.subtotal'), ] ] ], [ @@ -288,22 +288,22 @@ class CartRuleRepository extends Repository 'key' => 'product|category_ids', 'type' => 'multiselect', 'label' => trans('admin::app.promotions.cart-rules.categories'), - 'options' => $categories = $this->categoryRepository->getCategoryTree() + 'options' => $categories = $this->categoryRepository->getCategoryTree(), ], [ 'key' => 'product|children::category_ids', 'type' => 'multiselect', 'label' => trans('admin::app.promotions.cart-rules.children-categories'), - 'options' => $categories + 'options' => $categories, ], [ 'key' => 'product|parent::category_ids', 'type' => 'multiselect', 'label' => trans('admin::app.promotions.cart-rules.parent-categories'), - 'options' => $categories + 'options' => $categories, ], [ 'key' => 'product|attribute_family_id', 'type' => 'select', 'label' => trans('admin::app.promotions.cart-rules.attribute_family'), - 'options' => $this->getAttributeFamilies() + 'options' => $this->getAttributeFamilies(), ] ] ] @@ -330,21 +330,21 @@ class CartRuleRepository extends Repository 'key' => 'product|' . $attribute->code, 'type' => $attribute->type, 'label' => $attribute->name, - 'options' => $options + 'options' => $options, ]; $attributes[2]['children'][] = [ 'key' => 'product|children::' . $attribute->code, 'type' => $attribute->type, 'label' => trans('admin::app.promotions.cart-rules.attribute-name-children-only', ['attribute_name' => $attribute->name]), - 'options' => $options + 'options' => $options, ]; $attributes[2]['children'][] = [ 'key' => 'product|parent::' . $attribute->code, 'type' => $attribute->type, 'label' => trans('admin::app.promotions.cart-rules.attribute-name-parent-only', ['attribute_name' => $attribute->name]), - 'options' => $options + 'options' => $options, ]; } @@ -365,7 +365,7 @@ class CartRuleRepository extends Repository $methods[] = [ 'id' => $object->getCode(), - 'admin_name' => $object->getTitle() + 'admin_name' => $object->getTitle(), ]; } @@ -386,7 +386,7 @@ class CartRuleRepository extends Repository $methods[] = [ 'id' => $object->getCode(), - 'admin_name' => $object->getTitle() + 'admin_name' => $object->getTitle(), ]; } @@ -472,7 +472,7 @@ class CartRuleRepository extends Repository $collection[] = [ 'id' => $country->code, 'admin_name' => $country->name, - 'states' => $countryStates + 'states' => $countryStates, ]; } diff --git a/packages/Webkul/CatalogRule/src/Http/Controllers/CatalogRuleController.php b/packages/Webkul/CatalogRule/src/Http/Controllers/CatalogRuleController.php index 7196d97cb..1f0070803 100644 --- a/packages/Webkul/CatalogRule/src/Http/Controllers/CatalogRuleController.php +++ b/packages/Webkul/CatalogRule/src/Http/Controllers/CatalogRuleController.php @@ -89,7 +89,7 @@ class CatalogRuleController extends Controller 'starts_from' => 'nullable|date', 'ends_till' => 'nullable|date|after_or_equal:starts_from', 'action_type' => 'required', - 'discount_amount' => 'required|numeric' + 'discount_amount' => 'required|numeric', ]); $data = request()->all(); @@ -136,7 +136,7 @@ class CatalogRuleController extends Controller 'starts_from' => 'nullable|date', 'ends_till' => 'nullable|date|after_or_equal:starts_from', 'action_type' => 'required', - 'discount_amount' => 'required|numeric' + 'discount_amount' => 'required|numeric', ]); $catalogRule = $this->catalogRuleRepository->findOrFail($id); diff --git a/packages/Webkul/CatalogRule/src/Models/CatalogRule.php b/packages/Webkul/CatalogRule/src/Models/CatalogRule.php index 152e3b52f..231f35983 100644 --- a/packages/Webkul/CatalogRule/src/Models/CatalogRule.php +++ b/packages/Webkul/CatalogRule/src/Models/CatalogRule.php @@ -24,7 +24,7 @@ class CatalogRule extends Model implements CatalogRuleContract ]; protected $casts = [ - 'conditions' => 'array' + 'conditions' => 'array', ]; /** diff --git a/packages/Webkul/CatalogRule/src/Repositories/CatalogRuleRepository.php b/packages/Webkul/CatalogRule/src/Repositories/CatalogRuleRepository.php index af595c8d0..c79ea21a1 100644 --- a/packages/Webkul/CatalogRule/src/Repositories/CatalogRuleRepository.php +++ b/packages/Webkul/CatalogRule/src/Repositories/CatalogRuleRepository.php @@ -148,12 +148,12 @@ class CatalogRuleRepository extends Repository 'key' => 'product|category_ids', 'type' => 'multiselect', 'label' => trans('admin::app.promotions.catalog-rules.categories'), - 'options' => $this->categoryRepository->getCategoryTree() + 'options' => $this->categoryRepository->getCategoryTree(), ], [ 'key' => 'product|attribute_family_id', 'type' => 'select', 'label' => trans('admin::app.promotions.catalog-rules.attribute_family'), - 'options' => $this->getAttributeFamilies() + 'options' => $this->getAttributeFamilies(), ] ] ] @@ -178,7 +178,7 @@ class CatalogRuleRepository extends Repository 'key' => 'product|' . $attribute->code, 'type' => $attribute->type, 'label' => $attribute->name, - 'options' => $options + 'options' => $options, ]; } diff --git a/packages/Webkul/Category/src/Http/Controllers/CategoryController.php b/packages/Webkul/Category/src/Http/Controllers/CategoryController.php index 24f0e679d..8ab339ca6 100755 --- a/packages/Webkul/Category/src/Http/Controllers/CategoryController.php +++ b/packages/Webkul/Category/src/Http/Controllers/CategoryController.php @@ -90,7 +90,7 @@ class CategoryController extends Controller 'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug], 'name' => 'required', 'image.*' => 'mimes:jpeg,jpg,bmp,png', - 'description' => 'required_if:display_mode,==,description_only,products_and_description' + 'description' => 'required_if:display_mode,==,description_only,products_and_description', ]); if (strtolower(request()->input('name')) == 'root') { @@ -146,7 +146,7 @@ class CategoryController extends Controller } }], $locale . '.name' => 'required', - 'image.*' => 'mimes:jpeg,jpg,bmp,png' + 'image.*' => 'mimes:jpeg,jpg,bmp,png', ]); $this->categoryRepository->update(request()->all(), $id); diff --git a/packages/Webkul/Category/src/Models/CategoryTranslation.php b/packages/Webkul/Category/src/Models/CategoryTranslation.php index fc6318486..71ccee2fa 100755 --- a/packages/Webkul/Category/src/Models/CategoryTranslation.php +++ b/packages/Webkul/Category/src/Models/CategoryTranslation.php @@ -16,5 +16,13 @@ class CategoryTranslation extends Model implements CategoryTranslationContract { public $timestamps = false; - protected $fillable = ['name', 'description', 'slug', 'meta_title', 'meta_description', 'meta_keywords', 'locale_id']; + protected $fillable = [ + 'name', + 'description', + 'slug', + 'meta_title', + 'meta_description', + 'meta_keywords', + 'locale_id', + ]; } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php b/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php index 0345ddf5c..0af0c484b 100755 --- a/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php +++ b/packages/Webkul/Category/src/Providers/CategoryServiceProvider.php @@ -23,16 +23,6 @@ class CategoryServiceProvider extends ServiceProvider $this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories'); } - /** - * Register services. - * - * @return void - */ - public function register() - { - - } - /** * Register factories. * diff --git a/packages/Webkul/Category/src/Repositories/CategoryRepository.php b/packages/Webkul/Category/src/Repositories/CategoryRepository.php index 7096938bd..c6ba31f60 100755 --- a/packages/Webkul/Category/src/Repositories/CategoryRepository.php +++ b/packages/Webkul/Category/src/Repositories/CategoryRepository.php @@ -246,7 +246,7 @@ class CategoryRepository extends Repository $trimmed[$key] = [ 'id' => $category->id, 'name' => $category->name, - 'slug' => $category->slug + 'slug' => $category->slug, ]; } } diff --git a/packages/Webkul/Checkout/src/Http/Requests/CustomerAddressForm.php b/packages/Webkul/Checkout/src/Http/Requests/CustomerAddressForm.php index bf011a092..99e87fea3 100755 --- a/packages/Webkul/Checkout/src/Http/Requests/CustomerAddressForm.php +++ b/packages/Webkul/Checkout/src/Http/Requests/CustomerAddressForm.php @@ -40,7 +40,7 @@ class CustomerAddressForm extends FormRequest 'billing.state' => ['required'], 'billing.postcode' => ['required'], 'billing.phone' => ['required'], - 'billing.country' => ['required'] + 'billing.country' => ['required'], ]; } @@ -59,7 +59,7 @@ class CustomerAddressForm extends FormRequest 'shipping.state' => ['required'], 'shipping.postcode' => ['required'], 'shipping.phone' => ['required'], - 'shipping.country' => ['required'] + 'shipping.country' => ['required'], ]); } } diff --git a/packages/Webkul/Checkout/src/Models/Cart.php b/packages/Webkul/Checkout/src/Models/Cart.php index 496823cb6..05ff14562 100755 --- a/packages/Webkul/Checkout/src/Models/Cart.php +++ b/packages/Webkul/Checkout/src/Models/Cart.php @@ -10,9 +10,16 @@ class Cart extends Model implements CartContract { protected $table = 'cart'; - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; - protected $with = ['items', 'items.children']; + protected $with = [ + 'items', + 'items.children', + ]; /** * To get relevant associated items with the cart instance diff --git a/packages/Webkul/Checkout/src/Models/CartAddress.php b/packages/Webkul/Checkout/src/Models/CartAddress.php index 737632589..0eca0b0e9 100755 --- a/packages/Webkul/Checkout/src/Models/CartAddress.php +++ b/packages/Webkul/Checkout/src/Models/CartAddress.php @@ -23,7 +23,7 @@ class CartAddress extends Model implements CartAddressContract 'phone', 'address_type', 'cart_id', - ]; + ]; /** * Get the shipping rates for the cart address. diff --git a/packages/Webkul/Checkout/src/Models/CartItem.php b/packages/Webkul/Checkout/src/Models/CartItem.php index eacd9a15c..561b85c64 100755 --- a/packages/Webkul/Checkout/src/Models/CartItem.php +++ b/packages/Webkul/Checkout/src/Models/CartItem.php @@ -16,7 +16,11 @@ class CartItem extends Model implements CartItemContract 'additional' => 'array', ]; - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; public function product() { diff --git a/packages/Webkul/Checkout/src/Providers/EventServiceProvider.php b/packages/Webkul/Checkout/src/Providers/EventServiceProvider.php index f34647dd5..f6564c1e1 100644 --- a/packages/Webkul/Checkout/src/Providers/EventServiceProvider.php +++ b/packages/Webkul/Checkout/src/Providers/EventServiceProvider.php @@ -12,6 +12,6 @@ class EventServiceProvider extends ServiceProvider * @var array */ protected $subscribe = [ - 'Webkul\Checkout\Listeners\CustomerEventsHandler' + 'Webkul\Checkout\Listeners\CustomerEventsHandler', ]; } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Config/concord.php b/packages/Webkul/Core/src/Config/concord.php index 24c40b47a..87ed5793b 100644 --- a/packages/Webkul/Core/src/Config/concord.php +++ b/packages/Webkul/Core/src/Config/concord.php @@ -21,6 +21,6 @@ return [ \Webkul\User\Providers\ModuleServiceProvider::class, \Webkul\CatalogRule\Providers\ModuleServiceProvider::class, \Webkul\CartRule\Providers\ModuleServiceProvider::class, - \Webkul\CMS\Providers\ModuleServiceProvider::class + \Webkul\CMS\Providers\ModuleServiceProvider::class, ] ]; \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Seeders/ChannelTableSeeder.php b/packages/Webkul/Core/src/Database/Seeders/ChannelTableSeeder.php index bf8428331..8d593d1e3 100755 --- a/packages/Webkul/Core/src/Database/Seeders/ChannelTableSeeder.php +++ b/packages/Webkul/Core/src/Database/Seeders/ChannelTableSeeder.php @@ -21,22 +21,22 @@ class ChannelTableSeeder extends Seeder 'name' => 'Default', 'default_locale_id' => 1, 'base_currency_id' => 1, - 'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}' + 'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}', ]); DB::table('channel_currencies')->insert([ 'channel_id' => 1, - 'currency_id' => 1 + 'currency_id' => 1, ]); DB::table('channel_locales')->insert([ 'channel_id' => 1, - 'locale_id' => 1 + 'locale_id' => 1, ]); DB::table('channel_inventory_sources')->insert([ 'channel_id' => 1, - 'inventory_source_id' => 1 + 'inventory_source_id' => 1, ]); } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder.php b/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder.php index 2a201ea98..56572b270 100755 --- a/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder.php +++ b/packages/Webkul/Core/src/Database/Seeders/CurrencyTableSeeder.php @@ -16,12 +16,12 @@ class CurrencyTableSeeder extends Seeder DB::table('currencies')->insert([ 'id' => 1, 'code' => 'USD', - 'name' => 'US Dollar' + 'name' => 'US Dollar', ], [ 'id' => 2, 'code' => 'EUR', 'name' => 'Euro', - 'symbol' => '€' + 'symbol' => '€', ] ); } diff --git a/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php b/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php index d97241fea..0e0323522 100755 --- a/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php +++ b/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php @@ -69,7 +69,7 @@ class CurrencyController extends Controller { $this->validate(request(), [ 'code' => 'required|min:3|max:3|unique:currencies,code', - 'name' => 'required' + 'name' => 'required', ]); Event::dispatch('core.currency.create.before'); @@ -106,7 +106,7 @@ class CurrencyController extends Controller { $this->validate(request(), [ 'code' => ['required', 'unique:currencies,code,' . $id, new \Webkul\Core\Contracts\Validations\Code], - 'name' => 'required' + 'name' => 'required', ]); Event::dispatch('core.currency.update.before', $id); diff --git a/packages/Webkul/Core/src/Models/Currency.php b/packages/Webkul/Core/src/Models/Currency.php index 1c47d772f..70170d19f 100755 --- a/packages/Webkul/Core/src/Models/Currency.php +++ b/packages/Webkul/Core/src/Models/Currency.php @@ -12,7 +12,11 @@ class Currency extends Model implements CurrencyContract * * @var array */ - protected $fillable = ['code', 'name', 'symbol']; + protected $fillable = [ + 'code', + 'name', + 'symbol', + ]; /** * Set currency code in capital diff --git a/packages/Webkul/Core/src/Providers/ModuleServiceProvider.php b/packages/Webkul/Core/src/Providers/ModuleServiceProvider.php index 1a8afd629..43c2f2aa9 100644 --- a/packages/Webkul/Core/src/Providers/ModuleServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/ModuleServiceProvider.php @@ -17,6 +17,6 @@ class ModuleServiceProvider extends BaseModuleServiceProvider \Webkul\Core\Models\CurrencyExchangeRate::class, \Webkul\Core\Models\Locale::class, \Webkul\Core\Models\Slider::class, - \Webkul\Core\Models\SubscribersList::class + \Webkul\Core\Models\SubscribersList::class, ]; } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Repositories/CoreConfigRepository.php b/packages/Webkul/Core/src/Repositories/CoreConfigRepository.php index 8d27999f5..1f0a78ed1 100755 --- a/packages/Webkul/Core/src/Repositories/CoreConfigRepository.php +++ b/packages/Webkul/Core/src/Repositories/CoreConfigRepository.php @@ -88,7 +88,7 @@ class CoreConfigRepository extends Repository 'code' => $fieldName, 'value' => $value, 'locale_code' => $localeBased ? $locale : null, - 'channel_code' => $channelBased ? $channel : null + 'channel_code' => $channelBased ? $channel : null, ]); } else { foreach ($coreConfigValue as $coreConfig) { @@ -101,7 +101,7 @@ class CoreConfigRepository extends Repository 'code' => $fieldName, 'value' => $value, 'locale_code' => $localeBased ? $locale : null, - 'channel_code' => $channelBased ? $channel : null + 'channel_code' => $channelBased ? $channel : null, ]); } } diff --git a/packages/Webkul/Core/src/resources/manifest.php b/packages/Webkul/Core/src/resources/manifest.php index fae55b951..502f15201 100644 --- a/packages/Webkul/Core/src/resources/manifest.php +++ b/packages/Webkul/Core/src/resources/manifest.php @@ -2,5 +2,5 @@ return [ 'name' => 'Webkul Bagisto Core', - 'version' => '0.0.1' + 'version' => '0.0.1', ]; diff --git a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php index 1c08091fe..0871d4372 100755 --- a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php +++ b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php @@ -16,7 +16,7 @@ class CustomerGroupTableSeeder extends Seeder 'id' => 1, 'code' => 'guest', 'name' => 'Guest', - 'is_user_defined' => 0 + 'is_user_defined' => 0, ], [ 'id' => 2, 'code' => 'general', @@ -26,7 +26,7 @@ class CustomerGroupTableSeeder extends Seeder 'id' => 3, 'code' => 'wholesale', 'name' => 'Wholesale', - 'is_user_defined' => 0 + 'is_user_defined' => 0, ] ]); } diff --git a/packages/Webkul/Customer/src/Helpers/Wishlist.php b/packages/Webkul/Customer/src/Helpers/Wishlist.php index e96d1db7f..935baa377 100644 --- a/packages/Webkul/Customer/src/Helpers/Wishlist.php +++ b/packages/Webkul/Customer/src/Helpers/Wishlist.php @@ -38,7 +38,7 @@ class Wishlist $wishlist = $this->wishlistRepository->findOneWhere([ 'channel_id' => core()->getCurrentChannel()->id, 'product_id' => $product->product_id, - 'customer_id' => auth()->guard('customer')->user()->id + 'customer_id' => auth()->guard('customer')->user()->id, ]); } diff --git a/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php b/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php index 1519b71d7..88b3afb6d 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/ForgotPasswordController.php @@ -52,7 +52,7 @@ class ForgotPasswordController extends Controller { try { $this->validate(request(), [ - 'email' => 'required|email' + 'email' => 'required|email', ]); $response = $this->broker()->sendResetLink( @@ -67,9 +67,9 @@ class ForgotPasswordController extends Controller return back() ->withInput(request(['email'])) - ->withErrors( - ['email' => trans($response)] - ); + ->withErrors([ + 'email' => trans($response), + ]); } catch (\Exception $e) { report($e); session()->flash('error', trans($e->getMessage())); diff --git a/packages/Webkul/Customer/src/Http/Controllers/ResetPasswordController.php b/packages/Webkul/Customer/src/Http/Controllers/ResetPasswordController.php index d6fc3b00d..537619d2d 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/ResetPasswordController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/ResetPasswordController.php @@ -77,7 +77,7 @@ class ResetPasswordController extends Controller return back() ->withInput(request(['email'])) ->withErrors([ - 'email' => trans($response) + 'email' => trans($response), ]); } catch(\Exception $e) { session()->flash('error', trans($e->getMessage())); diff --git a/packages/Webkul/Customer/src/Http/Controllers/SessionController.php b/packages/Webkul/Customer/src/Http/Controllers/SessionController.php index 4036000b8..bca78f7e5 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/SessionController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/SessionController.php @@ -55,7 +55,7 @@ class SessionController extends Controller { $this->validate(request(), [ 'email' => 'required|email', - 'password' => 'required' + 'password' => 'required', ]); if (! auth()->guard('customer')->attempt(request(['email', 'password']))) { diff --git a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php index cd6b3dc4a..a8c80ce04 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php @@ -84,13 +84,13 @@ class WishlistController extends Controller $data = [ 'channel_id' => core()->getCurrentChannel()->id, 'product_id' => $itemId, - 'customer_id' => auth()->guard('customer')->user()->id + 'customer_id' => auth()->guard('customer')->user()->id, ]; $checked = $this->wishlistRepository->findWhere([ 'channel_id' => core()->getCurrentChannel()->id, 'product_id' => $itemId, - 'customer_id' => auth()->guard('customer')->user()->id + 'customer_id' => auth()->guard('customer')->user()->id, ]); //accidental case if some one adds id of the product in the anchor tag amd gives id of a variant. @@ -153,7 +153,7 @@ class WishlistController extends Controller { $wishlistItem = $this->wishlistRepository->findOneWhere([ 'id' => $itemId, - 'customer_id' => auth()->guard('customer')->user()->id + 'customer_id' => auth()->guard('customer')->user()->id, ]); if (! $wishlistItem) { diff --git a/packages/Webkul/Customer/src/Notifications/CustomerResetPassword.php b/packages/Webkul/Customer/src/Notifications/CustomerResetPassword.php index cda9741c6..0b8234d98 100755 --- a/packages/Webkul/Customer/src/Notifications/CustomerResetPassword.php +++ b/packages/Webkul/Customer/src/Notifications/CustomerResetPassword.php @@ -24,7 +24,7 @@ class CustomerResetPassword extends ResetPassword ->subject(__('shop::app.mail.forget-password.subject') ) ->view('shop::emails.customer.forget-password', [ 'user_name' => $notifiable->name, - 'token' => $this->token + 'token' => $this->token, ] ); } diff --git a/packages/Webkul/Customer/src/Repositories/WishlistRepository.php b/packages/Webkul/Customer/src/Repositories/WishlistRepository.php index 08ae3347b..2c678657a 100755 --- a/packages/Webkul/Customer/src/Repositories/WishlistRepository.php +++ b/packages/Webkul/Customer/src/Repositories/WishlistRepository.php @@ -70,7 +70,7 @@ class WishlistRepository extends Repository public function getCustomerWhishlist() { return $this->model->where([ 'channel_id' => core()->getCurrentChannel()->id, - 'customer_id' => auth()->guard('customer')->user()->id + 'customer_id' => auth()->guard('customer')->user()->id, ])->paginate(5); } } \ No newline at end of file diff --git a/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php b/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php index a17543cad..e09114eaa 100755 --- a/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php +++ b/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php @@ -23,7 +23,7 @@ class InventoryTableSeeder extends Seeder 'state' => 'MI', 'street' => '12th Street', 'city' => 'Detroit', - 'postcode' => '48127' + 'postcode' => '48127', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php index 29c91b3e9..5dfedeffa 100755 --- a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php +++ b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php @@ -77,7 +77,7 @@ class InventorySourceController extends Controller 'country' => 'required', 'state' => 'required', 'city' => 'required', - 'postcode' => 'required' + 'postcode' => 'required', ]); $data = request()->all(); @@ -126,7 +126,7 @@ class InventorySourceController extends Controller 'country' => 'required', 'state' => 'required', 'city' => 'required', - 'postcode' => 'required' + 'postcode' => 'required', ]); $data = request()->all(); diff --git a/packages/Webkul/Payment/src/Config/paymentmethods.php b/packages/Webkul/Payment/src/Config/paymentmethods.php index 19d0f6920..a3c4bdeb0 100755 --- a/packages/Webkul/Payment/src/Config/paymentmethods.php +++ b/packages/Webkul/Payment/src/Config/paymentmethods.php @@ -6,7 +6,7 @@ return [ 'description' => 'Cash On Delivery', 'class' => 'Webkul\Payment\Payment\CashOnDelivery', 'active' => true, - 'sort' => 1 + 'sort' => 1, ], 'moneytransfer' => [ @@ -15,7 +15,7 @@ return [ 'description' => 'Money Transfer', 'class' => 'Webkul\Payment\Payment\MoneyTransfer', 'active' => true, - 'sort' => 2 + 'sort' => 2, ], 'paypal_standard' => [ @@ -26,6 +26,6 @@ return [ 'sandbox' => true, 'active' => true, 'business_account' => 'test@webkul.com', - 'sort' => 3 + 'sort' => 3, ] ]; \ No newline at end of file diff --git a/packages/Webkul/Payment/src/Config/system.php b/packages/Webkul/Payment/src/Config/system.php index a926123e9..08172c916 100755 --- a/packages/Webkul/Payment/src/Config/system.php +++ b/packages/Webkul/Payment/src/Config/system.php @@ -20,20 +20,20 @@ return [ 'type' => 'text', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'description', 'title' => 'admin::app.admin.system.description', 'type' => 'textarea', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'active', 'title' => 'admin::app.admin.system.status', 'type' => 'boolean', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'sort', 'title' => 'admin::app.admin.system.sort_order', @@ -50,7 +50,7 @@ return [ 'value' => 3 ], [ 'title' => '4', - 'value' => 4 + 'value' => 4, ] ], ] @@ -66,20 +66,20 @@ return [ 'type' => 'text', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'description', 'title' => 'admin::app.admin.system.description', 'type' => 'textarea', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'active', 'title' => 'admin::app.admin.system.status', 'type' => 'boolean', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'sort', 'title' => 'admin::app.admin.system.sort_order', @@ -87,16 +87,16 @@ return [ 'options' => [ [ 'title' => '1', - 'value' => 1 + 'value' => 1, ], [ 'title' => '2', - 'value' => 2 + 'value' => 2, ], [ 'title' => '3', - 'value' => 3 + 'value' => 3, ], [ 'title' => '4', - 'value' => 4 + 'value' => 4, ] ], ] @@ -112,19 +112,19 @@ return [ 'type' => 'text', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'description', 'title' => 'admin::app.admin.system.description', 'type' => 'textarea', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'business_account', 'title' => 'admin::app.admin.system.business-account', 'type' => 'select', 'type' => 'text', - 'validation' => 'required' + 'validation' => 'required', ], [ 'name' => 'active', 'title' => 'admin::app.admin.system.status', @@ -138,7 +138,7 @@ return [ 'type' => 'boolean', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'sort', 'title' => 'admin::app.admin.system.sort_order', @@ -146,17 +146,17 @@ return [ 'options' => [ [ 'title' => '1', - 'value' => 1 + 'value' => 1, ], [ 'title' => '2', - 'value' => 2 + 'value' => 2, ], [ 'title' => '3', - 'value' => 3 + 'value' => 3, ], [ 'title' => '4', - 'value' => 4 - ] + 'value' => 4, + ], ], ] ] diff --git a/packages/Webkul/Payment/src/Payment.php b/packages/Webkul/Payment/src/Payment.php index 257e41509..8c8113c15 100755 --- a/packages/Webkul/Payment/src/Payment.php +++ b/packages/Webkul/Payment/src/Payment.php @@ -19,7 +19,7 @@ class Payment return [ 'jump_to_section' => 'payment', 'paymentMethods' => $this->getPaymentMethods(), - 'html' => view('shop::checkout.onepage.payment', compact('paymentMethods'))->render() + 'html' => view('shop::checkout.onepage.payment', compact('paymentMethods'))->render(), ]; } diff --git a/packages/Webkul/Paypal/src/Payment/Paypal.php b/packages/Webkul/Paypal/src/Payment/Paypal.php index f13ec5704..6241c5678 100755 --- a/packages/Webkul/Paypal/src/Payment/Paypal.php +++ b/packages/Webkul/Paypal/src/Payment/Paypal.php @@ -68,7 +68,7 @@ abstract class Paypal extends Payment 'zip' => $billingAddress->postcode, 'state' => $billingAddress->state, 'address1' => $billingAddress->address1, - 'address_override' => 1 + 'address_override' => 1, ]); } diff --git a/packages/Webkul/Paypal/src/Payment/Standard.php b/packages/Webkul/Paypal/src/Payment/Standard.php index a0305185e..55f47697f 100755 --- a/packages/Webkul/Paypal/src/Payment/Standard.php +++ b/packages/Webkul/Paypal/src/Payment/Standard.php @@ -61,7 +61,7 @@ class Standard extends Paypal 'amount' => $cart->sub_total, 'tax' => $cart->tax_total, 'shipping' => $cart->selected_shipping_rate ? $cart->selected_shipping_rate->price : 0, - 'discount_amount' => $cart->discount_amount + 'discount_amount' => $cart->discount_amount, ]; if ($this->getIsLineItemsEnabled()) { diff --git a/packages/Webkul/Product/src/Config/product_types.php b/packages/Webkul/Product/src/Config/product_types.php index faf0b7d8f..56fe6fe28 100644 --- a/packages/Webkul/Product/src/Config/product_types.php +++ b/packages/Webkul/Product/src/Config/product_types.php @@ -5,41 +5,41 @@ return [ 'key' => 'simple', 'name' => 'Simple', 'class' => 'Webkul\Product\Type\Simple', - 'sort' => 1 + 'sort' => 1, ], 'configurable' => [ 'key' => 'configurable', 'name' => 'Configurable', 'class' => 'Webkul\Product\Type\Configurable', - 'sort' => 2 + 'sort' => 2, ], 'virtual' => [ 'key' => 'virtual', 'name' => 'Virtual', 'class' => 'Webkul\Product\Type\Virtual', - 'sort' => 3 + 'sort' => 3, ], 'grouped' => [ 'key' => 'grouped', 'name' => 'Grouped', 'class' => 'Webkul\Product\Type\Grouped', - 'sort' => 4 + 'sort' => 4, ], 'downloadable' => [ 'key' => 'downloadable', 'name' => 'Downloadable', 'class' => 'Webkul\Product\Type\Downloadable', - 'sort' => 5 + 'sort' => 5, ], 'bundle' => [ 'key' => 'bundle', 'name' => 'Bundle', 'class' => 'Webkul\Product\Type\Bundle', - 'sort' => 6 + 'sort' => 6, ] ]; \ No newline at end of file diff --git a/packages/Webkul/Product/src/Helpers/BundleOption.php b/packages/Webkul/Product/src/Helpers/BundleOption.php index 38120fef8..06f0a6baa 100644 --- a/packages/Webkul/Product/src/Helpers/BundleOption.php +++ b/packages/Webkul/Product/src/Helpers/BundleOption.php @@ -28,7 +28,7 @@ class BundleOption extends AbstractProduct $this->product = $product; return [ - 'options' => $this->getOptions() + 'options' => $this->getOptions(), ]; } @@ -70,7 +70,7 @@ class BundleOption extends AbstractProduct 'type' => $option->type, 'is_required' => $option->is_required, 'products' => $this->getOptionProducts($option), - 'sort_order' => $option->sort_order + 'sort_order' => $option->sort_order, ]; } @@ -92,7 +92,7 @@ class BundleOption extends AbstractProduct 'name' => $bundleOptionProduct->product->name, 'product_id' => $bundleOptionProduct->product_id, 'is_default' => $bundleOptionProduct->is_default, - 'sort_order' => $bundleOptionProduct->sort_order + 'sort_order' => $bundleOptionProduct->sort_order, ]; } diff --git a/packages/Webkul/Product/src/Helpers/ConfigurableOption.php b/packages/Webkul/Product/src/Helpers/ConfigurableOption.php index a92104c13..92b870987 100755 --- a/packages/Webkul/Product/src/Helpers/ConfigurableOption.php +++ b/packages/Webkul/Product/src/Helpers/ConfigurableOption.php @@ -83,11 +83,11 @@ class ConfigurableOption extends AbstractProduct 'index' => isset($options['index']) ? $options['index'] : [], 'regular_price' => [ 'formated_price' => core()->currency($product->getTypeInstance()->getMinimalPrice()), - 'price' => $product->getTypeInstance()->getMinimalPrice() + 'price' => $product->getTypeInstance()->getMinimalPrice(), ], 'variant_prices' => $this->getVariantPrices($product), 'variant_images' => $this->getVariantImages($product), - 'chooseText' => trans('shop::app.products.choose-option') + 'chooseText' => trans('shop::app.products.choose-option'), ]; return $config; @@ -169,7 +169,7 @@ class ConfigurableOption extends AbstractProduct 'code' => $attribute->code, 'label' => $attribute->name ? $attribute->name : $attribute->admin_name, 'swatch_type' => $attribute->swatch_type, - 'options' => $attributeOptionsData + 'options' => $attributeOptionsData, ]; } } @@ -195,7 +195,7 @@ class ConfigurableOption extends AbstractProduct 'id' => $optionId, 'label' => $attributeOption->label ? $attributeOption->label : $attributeOption->admin_name, 'swatch_value' => $attribute->swatch_type == 'image' ? $attributeOption->swatch_value_url : $attributeOption->swatch_value, - 'products' => $options[$attribute->id][$optionId] + 'products' => $options[$attribute->id][$optionId], ]; } } diff --git a/packages/Webkul/Product/src/Helpers/ProductImage.php b/packages/Webkul/Product/src/Helpers/ProductImage.php index a61df05ac..b99d6056f 100755 --- a/packages/Webkul/Product/src/Helpers/ProductImage.php +++ b/packages/Webkul/Product/src/Helpers/ProductImage.php @@ -44,7 +44,7 @@ class ProductImage extends AbstractProduct 'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'), 'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'), 'large_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'), - 'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png') + 'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.png'), ]; } diff --git a/packages/Webkul/Product/src/Helpers/Toolbar.php b/packages/Webkul/Product/src/Helpers/Toolbar.php index 23a305a18..5866b50ec 100755 --- a/packages/Webkul/Product/src/Helpers/Toolbar.php +++ b/packages/Webkul/Product/src/Helpers/Toolbar.php @@ -24,7 +24,7 @@ class Toolbar extends AbstractProduct 'created_at-desc' => 'newest-first', 'created_at-asc' => 'oldest-first', 'price-asc' => 'cheapest-first', - 'price-desc' => 'expensive-first' + 'price-desc' => 'expensive-first', ]; } /** @@ -50,7 +50,7 @@ class Toolbar extends AbstractProduct return request()->fullUrlWithQuery([ 'sort' => current($keys), - 'order' => end($keys) + 'order' => end($keys), ]); } @@ -63,7 +63,7 @@ class Toolbar extends AbstractProduct public function getLimitUrl($limit) { return request()->fullUrlWithQuery([ - 'limit' => $limit + 'limit' => $limit, ]); } @@ -76,7 +76,7 @@ class Toolbar extends AbstractProduct public function getModeUrl($mode) { return request()->fullUrlWithQuery([ - 'mode' => $mode + 'mode' => $mode, ]); } diff --git a/packages/Webkul/Product/src/Http/Controllers/ProductController.php b/packages/Webkul/Product/src/Http/Controllers/ProductController.php index 26a36945c..a5b240b86 100755 --- a/packages/Webkul/Product/src/Http/Controllers/ProductController.php +++ b/packages/Webkul/Product/src/Http/Controllers/ProductController.php @@ -159,7 +159,7 @@ class ProductController extends Controller $this->validate(request(), [ 'type' => 'required', 'attribute_family_id' => 'required', - 'sku' => ['required', 'unique:products,sku', new \Webkul\Core\Contracts\Validations\Slug] + 'sku' => ['required', 'unique:products,sku', new \Webkul\Core\Contracts\Validations\Slug], ]); $product = $this->productRepository->create(request()->all()); @@ -298,7 +298,7 @@ class ProductController extends Controller $this->productRepository->update([ 'channel' => null, 'locale' => null, - 'status' => $data['update-options'] + 'status' => $data['update-options'], ], $productId); } @@ -351,7 +351,7 @@ class ProductController extends Controller { $productAttribute = $this->productAttributeValue->findOneWhere([ 'product_id' => $productId, - 'attribute_id' => $attributeId + 'attribute_id' => $attributeId, ]); return Storage::download($productAttribute['text_value']); diff --git a/packages/Webkul/Product/src/Http/Requests/ProductForm.php b/packages/Webkul/Product/src/Http/Requests/ProductForm.php index b42adf964..26ec1bf84 100755 --- a/packages/Webkul/Product/src/Http/Requests/ProductForm.php +++ b/packages/Webkul/Product/src/Http/Requests/ProductForm.php @@ -75,7 +75,7 @@ class ProductForm extends FormRequest 'images.*' => 'mimes:jpeg,jpg,bmp,png', 'special_price_from' => 'nullable|date', 'special_price_to' => 'nullable|date|after_or_equal:special_price_from', - 'special_price' => ['nullable', new \Webkul\Core\Contracts\Validations\Decimal, 'lt:price'] + 'special_price' => ['nullable', new \Webkul\Core\Contracts\Validations\Decimal, 'lt:price'], ]); foreach ($product->getEditableAttributes() as $attribute) { diff --git a/packages/Webkul/Product/src/Listeners/ProductFlat.php b/packages/Webkul/Product/src/Listeners/ProductFlat.php index 43e13c51d..56942b766 100644 --- a/packages/Webkul/Product/src/Listeners/ProductFlat.php +++ b/packages/Webkul/Product/src/Listeners/ProductFlat.php @@ -69,7 +69,7 @@ class ProductFlat 'date' => 'date', 'file' => 'text', 'image' => 'text', - 'checkbox' => 'text' + 'checkbox' => 'text', ]; /** @@ -197,14 +197,14 @@ class ProductFlat $productFlat = $this->productFlatRepository->findOneWhere([ 'product_id' => $product->id, 'channel' => $channel->code, - 'locale' => $locale->code + 'locale' => $locale->code, ]); if (! $productFlat) { $productFlat = $this->productFlatRepository->create([ 'product_id' => $product->id, 'channel' => $channel->code, - 'locale' => $locale->code + 'locale' => $locale->code, ]); } @@ -287,7 +287,7 @@ class ProductFlat $parentProductFlat = $this->productFlatRepository->findOneWhere([ 'product_id' => $parentProduct->id, 'channel' => $channel->code, - 'locale' => $locale->code + 'locale' => $locale->code, ]); if ($parentProductFlat) { diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index c1c583c64..8253a79f8 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -11,7 +11,12 @@ use Webkul\Product\Contracts\Product as ProductContract; class Product extends Model implements ProductContract { - protected $fillable = ['type', 'attribute_family_id', 'sku', 'parent_id']; + protected $fillable = [ + 'type', + 'attribute_family_id', + 'sku', + 'parent_id', + ]; protected $typeInstance; diff --git a/packages/Webkul/Product/src/Models/ProductAttributeValue.php b/packages/Webkul/Product/src/Models/ProductAttributeValue.php index eef296c43..562fc07b3 100755 --- a/packages/Webkul/Product/src/Models/ProductAttributeValue.php +++ b/packages/Webkul/Product/src/Models/ProductAttributeValue.php @@ -40,7 +40,7 @@ class ProductAttributeValue extends Model implements ProductAttributeValueContra 'float_value', 'datetime_value', 'date_value', - 'json_value' + 'json_value', ]; /** diff --git a/packages/Webkul/Product/src/Models/ProductBundleOption.php b/packages/Webkul/Product/src/Models/ProductBundleOption.php index e94524762..fa1918698 100644 --- a/packages/Webkul/Product/src/Models/ProductBundleOption.php +++ b/packages/Webkul/Product/src/Models/ProductBundleOption.php @@ -11,7 +11,12 @@ class ProductBundleOption extends TranslatableModel implements ProductBundleOpti public $translatedAttributes = ['label']; - protected $fillable = ['type', 'is_required', 'sort_order', 'product_id']; + protected $fillable = [ + 'type', + 'is_required', + 'sort_order', + 'product_id', + ]; /** * Get the product that owns the image. diff --git a/packages/Webkul/Product/src/Models/ProductDownloadableSample.php b/packages/Webkul/Product/src/Models/ProductDownloadableSample.php index 8760c1f49..9a373635d 100644 --- a/packages/Webkul/Product/src/Models/ProductDownloadableSample.php +++ b/packages/Webkul/Product/src/Models/ProductDownloadableSample.php @@ -10,7 +10,14 @@ class ProductDownloadableSample extends TranslatableModel implements ProductDown { public $translatedAttributes = ['title']; - protected $fillable = ['url', 'file', 'file_name', 'type', 'sort_order', 'product_id']; + protected $fillable = [ + 'url', + 'file', + 'file_name', + 'type', + 'sort_order', + 'product_id', + ]; protected $with = ['translations']; diff --git a/packages/Webkul/Product/src/Models/ProductFlat.php b/packages/Webkul/Product/src/Models/ProductFlat.php index cbb89fffe..f84a856da 100644 --- a/packages/Webkul/Product/src/Models/ProductFlat.php +++ b/packages/Webkul/Product/src/Models/ProductFlat.php @@ -9,7 +9,11 @@ class ProductFlat extends Model implements ProductFlatContract { protected $table = 'product_flat'; - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; public $timestamps = false; diff --git a/packages/Webkul/Product/src/Models/ProductGroupedProduct.php b/packages/Webkul/Product/src/Models/ProductGroupedProduct.php index 9a5b038d7..92bdd6f0a 100644 --- a/packages/Webkul/Product/src/Models/ProductGroupedProduct.php +++ b/packages/Webkul/Product/src/Models/ProductGroupedProduct.php @@ -9,7 +9,12 @@ class ProductGroupedProduct extends Model implements ProductGroupedProductContra { public $timestamps = false; - protected $fillable = ['qty', 'sort_order', 'product_id', 'associated_product_id']; + protected $fillable = [ + 'qty', + 'sort_order', + 'product_id', + 'associated_product_id', + ]; /** * Get the product that owns the image. diff --git a/packages/Webkul/Product/src/Models/ProductImage.php b/packages/Webkul/Product/src/Models/ProductImage.php index 26395a111..d365dbe7a 100755 --- a/packages/Webkul/Product/src/Models/ProductImage.php +++ b/packages/Webkul/Product/src/Models/ProductImage.php @@ -10,7 +10,10 @@ class ProductImage extends Model implements ProductImageContract { public $timestamps = false; - protected $fillable = ['path', 'product_id']; + protected $fillable = [ + 'path', + 'product_id', + ]; /** * Get the product that owns the image. diff --git a/packages/Webkul/Product/src/Models/ProductInventory.php b/packages/Webkul/Product/src/Models/ProductInventory.php index 279a84eff..4b7d41301 100755 --- a/packages/Webkul/Product/src/Models/ProductInventory.php +++ b/packages/Webkul/Product/src/Models/ProductInventory.php @@ -10,7 +10,12 @@ class ProductInventory extends Model implements ProductInventoryContract { public $timestamps = false; - protected $fillable = ['qty', 'product_id', 'inventory_source_id', 'vendor_id']; + protected $fillable = [ + 'qty', + 'product_id', + 'inventory_source_id', + 'vendor_id', + ]; /** * Get the product attribute family that owns the product. diff --git a/packages/Webkul/Product/src/Models/ProductOrderedInventory.php b/packages/Webkul/Product/src/Models/ProductOrderedInventory.php index d79280e38..ab5423cf4 100644 --- a/packages/Webkul/Product/src/Models/ProductOrderedInventory.php +++ b/packages/Webkul/Product/src/Models/ProductOrderedInventory.php @@ -11,7 +11,11 @@ class ProductOrderedInventory extends Model implements ProductOrderedInventoryCo { public $timestamps = false; - protected $fillable = ['qty', 'product_id', 'channel_id']; + protected $fillable = [ + 'qty', + 'product_id', + 'channel_id', + ]; /** * Get the channel owns the inventory. diff --git a/packages/Webkul/Product/src/Models/ProductSalableInventory.php b/packages/Webkul/Product/src/Models/ProductSalableInventory.php index 3775e07d8..6ca61aa5e 100644 --- a/packages/Webkul/Product/src/Models/ProductSalableInventory.php +++ b/packages/Webkul/Product/src/Models/ProductSalableInventory.php @@ -11,7 +11,12 @@ class ProductSalableInventory extends Model implements ProductSalableInventoryCo { public $timestamps = false; - protected $fillable = ['qty', 'sold_qty', 'product_id', 'channel_id']; + protected $fillable = [ + 'qty', + 'sold_qty', + 'product_id', + 'channel_id', + ]; /** * Get the channel owns the inventory. diff --git a/packages/Webkul/Product/src/Repositories/ProductDownloadableLinkRepository.php b/packages/Webkul/Product/src/Repositories/ProductDownloadableLinkRepository.php index b0eaf1442..df1a5bb82 100755 --- a/packages/Webkul/Product/src/Repositories/ProductDownloadableLinkRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductDownloadableLinkRepository.php @@ -36,7 +36,7 @@ class ProductDownloadableLinkRepository extends Repository return [ $type => $path = request()->file($type)->store('product_downloadable_links/' . $productId), $type . '_name' => $file->getClientOriginalName(), - $type . '_url' => Storage::url($path) + $type . '_url' => Storage::url($path), ]; } } diff --git a/packages/Webkul/Product/src/Repositories/ProductDownloadableSampleRepository.php b/packages/Webkul/Product/src/Repositories/ProductDownloadableSampleRepository.php index c298d0f0a..b86a7e2ff 100755 --- a/packages/Webkul/Product/src/Repositories/ProductDownloadableSampleRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductDownloadableSampleRepository.php @@ -35,7 +35,7 @@ class ProductDownloadableSampleRepository extends Repository return [ 'file' => $path = request()->file('file')->store('product_downloadable_links/' . $productId), 'file_name' => request()->file('file')->getClientOriginalName(), - 'file_url' => Storage::url($path) + 'file_url' => Storage::url($path), ]; } diff --git a/packages/Webkul/Product/src/Repositories/ProductImageRepository.php b/packages/Webkul/Product/src/Repositories/ProductImageRepository.php index 0bee073ff..8d1c25c9a 100755 --- a/packages/Webkul/Product/src/Repositories/ProductImageRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductImageRepository.php @@ -42,7 +42,7 @@ class ProductImageRepository extends Repository if (request()->hasFile($file)) { $this->create([ 'path' => request()->file($file)->store($dir), - 'product_id' => $product->id + 'product_id' => $product->id, ]); } } else { @@ -56,7 +56,7 @@ class ProductImageRepository extends Repository } $this->update([ - 'path' => request()->file($file)->store($dir) + 'path' => request()->file($file)->store($dir), ], $imageId); } } diff --git a/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php b/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php index fb0501d6d..6f979151b 100755 --- a/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductInventoryRepository.php @@ -37,7 +37,7 @@ class ProductInventoryRepository extends Repository $productInventory = $this->findOneWhere([ 'product_id' => $product->id, 'inventory_source_id' => $inventorySourceId, - 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0, ]); if ($productInventory) { @@ -49,7 +49,7 @@ class ProductInventoryRepository extends Repository 'qty' => $qty, 'product_id' => $product->id, 'inventory_source_id' => $inventorySourceId, - 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0, ]); } } diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php index 2c8fd2aa9..b00f6b051 100755 --- a/packages/Webkul/Product/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php @@ -166,7 +166,7 @@ class ProductRepository extends Repository $qb = $qb->where(function($query1) use($qb) { $aliases = [ 'products' => 'filter_', - 'variants' => 'variant_filter_' + 'variants' => 'variant_filter_', ]; foreach($aliases as $table => $alias) { diff --git a/packages/Webkul/Product/src/Type/AbstractType.php b/packages/Webkul/Product/src/Type/AbstractType.php index 12e65c1aa..daead4e78 100644 --- a/packages/Webkul/Product/src/Type/AbstractType.php +++ b/packages/Webkul/Product/src/Type/AbstractType.php @@ -206,16 +206,16 @@ abstract class AbstractType 'product_id' => $product->id, 'attribute_id' => $attribute->id, 'channel' => $attribute->value_per_channel ? $data['channel'] : null, - 'locale' => $attribute->value_per_locale ? $data['locale'] : null + 'locale' => $attribute->value_per_locale ? $data['locale'] : null, ]); if (! $attributeValue) { $this->attributeValueRepository->create([ - 'product_id' => $product->id, + 'product_id' => $product->id, 'attribute_id' => $attribute->id, - 'value' => $data[$attribute->code], - 'channel' => $attribute->value_per_channel ? $data['channel'] : null, - 'locale' => $attribute->value_per_locale ? $data['locale'] : null + 'value' => $data[$attribute->code], + 'channel' => $attribute->value_per_channel ? $data['channel'] : null, + 'locale' => $attribute->value_per_locale ? $data['locale'] : null, ]); } else { $this->attributeValueRepository->update([ @@ -534,11 +534,11 @@ abstract class AbstractType return [ 'regular_price' => [ 'price' => core()->convertPrice($this->product->price), - 'formated_price' => core()->currency($this->product->price) + 'formated_price' => core()->currency($this->product->price), ], 'final_price' => [ 'price' => core()->convertPrice($this->getMinimalPrice()), - 'formated_price' => core()->currency($this->getMinimalPrice()) + 'formated_price' => core()->currency($this->getMinimalPrice()), ] ]; } @@ -593,7 +593,7 @@ abstract class AbstractType 'total_weight' => ($this->product->weight ?? 0) * $data['quantity'], 'base_total_weight' => ($this->product->weight ?? 0) * $data['quantity'], 'type' => $this->product->type, - 'additional' => $this->getAdditionalOptions($data) + 'additional' => $this->getAdditionalOptions($data), ] ]; diff --git a/packages/Webkul/Product/src/Type/Bundle.php b/packages/Webkul/Product/src/Type/Bundle.php index cc7357915..cc8cbc009 100644 --- a/packages/Webkul/Product/src/Type/Bundle.php +++ b/packages/Webkul/Product/src/Type/Bundle.php @@ -347,22 +347,22 @@ class Bundle extends AbstractType 'from' => [ 'regular_price' => [ 'price' => core()->convertPrice($this->getRegularMinimalPrice()), - 'formated_price' => core()->currency($this->getRegularMinimalPrice()) + 'formated_price' => core()->currency($this->getRegularMinimalPrice()), ], 'final_price' => [ 'price' => core()->convertPrice($this->getMinimalPrice()), - 'formated_price' => core()->currency($this->getMinimalPrice()) + 'formated_price' => core()->currency($this->getMinimalPrice()), ] ], 'to' => [ 'regular_price' => [ 'price' => core()->convertPrice($this->getRegularMaximamPrice()), - 'formated_price' => core()->currency($this->getRegularMaximamPrice()) + 'formated_price' => core()->currency($this->getRegularMaximamPrice()), ], 'final_price' => [ 'price' => core()->convertPrice($this->getMaximamPrice()), - 'formated_price' => core()->currency($this->getMaximamPrice()) + 'formated_price' => core()->currency($this->getMaximamPrice()), ] ] ]; @@ -469,7 +469,7 @@ class Bundle extends AbstractType $optionProduct = $this->productBundleOptionProductRepository->findOneWhere([ 'id' => $optionProductId, - 'product_bundle_option_id' => $optionId + 'product_bundle_option_id' => $optionId, ]); $qty = $data['bundle_option_qty'][$optionId] ?? $optionProduct->qty; @@ -481,7 +481,7 @@ class Bundle extends AbstractType ]; } else { $products[$optionProduct->product_id] = array_merge($products[$optionProduct->product_id], [ - 'quantity' => $products[$optionProduct->product_id]['quantity'] + $qty + 'quantity' => $products[$optionProduct->product_id]['quantity'] + $qty, ]); } } diff --git a/packages/Webkul/Product/src/Type/Configurable.php b/packages/Webkul/Product/src/Type/Configurable.php index 3b9e51c5b..cb7ccddf7 100644 --- a/packages/Webkul/Product/src/Type/Configurable.php +++ b/packages/Webkul/Product/src/Type/Configurable.php @@ -141,7 +141,7 @@ class Configurable extends AbstractType 'inventories' => [], 'price' => 0, 'weight' => 0, - 'status' => 1 + 'status' => 1, ]; } @@ -153,10 +153,10 @@ class Configurable extends AbstractType } $variant = $this->productRepository->getModel()->create([ - 'parent_id' => $product->id, - 'type' => $typeOfVariants, + 'parent_id' => $product->id, + 'type' => $typeOfVariants, 'attribute_family_id' => $product->attribute_family_id, - 'sku' => $data['sku'], + 'sku' => $data['sku'], ]); foreach (['sku', 'name', 'price', 'weight', 'status'] as $attributeCode) { @@ -171,7 +171,7 @@ class Configurable extends AbstractType 'attribute_id' => $attribute->id, 'channel' => $channel->code, 'locale' => $locale->code, - 'value' => $data[$attributeCode] + 'value' => $data[$attributeCode], ]); } } @@ -181,7 +181,7 @@ class Configurable extends AbstractType 'product_id' => $variant->id, 'attribute_id' => $attribute->id, 'channel' => $channel->code, - 'value' => $data[$attributeCode] + 'value' => $data[$attributeCode], ]); } } @@ -192,14 +192,14 @@ class Configurable extends AbstractType 'product_id' => $variant->id, 'attribute_id' => $attribute->id, 'locale' => $locale->code, - 'value' => $data[$attributeCode] + 'value' => $data[$attributeCode], ]); } } else { $this->attributeValueRepository->create([ 'product_id' => $variant->id, 'attribute_id' => $attribute->id, - 'value' => $data[$attributeCode] + 'value' => $data[$attributeCode], ]); } } @@ -209,7 +209,7 @@ class Configurable extends AbstractType $this->attributeValueRepository->create([ 'product_id' => $variant->id, 'attribute_id' => $attributeId, - 'value' => $optionId + 'value' => $optionId, ]); } @@ -236,7 +236,7 @@ class Configurable extends AbstractType 'product_id' => $id, 'attribute_id' => $attribute->id, 'channel' => $attribute->value_per_channel ? $data['channel'] : null, - 'locale' => $attribute->value_per_locale ? $data['locale'] : null + 'locale' => $attribute->value_per_locale ? $data['locale'] : null, ]); if (! $attributeValue) { @@ -245,7 +245,7 @@ class Configurable extends AbstractType 'attribute_id' => $attribute->id, 'value' => $data[$attribute->code], 'channel' => $attribute->value_per_channel ? $data['channel'] : null, - 'locale' => $attribute->value_per_locale ? $data['locale'] : null + 'locale' => $attribute->value_per_locale ? $data['locale'] : null, ]); } else { $this->attributeValueRepository->update([ @@ -437,14 +437,17 @@ class Configurable extends AbstractType 'total_weight' => $childProduct->weight * $data['quantity'], 'base_total_weight' => $childProduct->weight * $data['quantity'], 'type' => $this->product->type, - 'additional' => $this->getAdditionalOptions($data) + 'additional' => $this->getAdditionalOptions($data), ], [ 'parent_id' => $this->product->id, 'product_id' => (int) $data['selected_configurable_option'], 'sku' => $childProduct->sku, 'name' => $childProduct->name, 'type' => 'simple', - 'additional' => ['product_id' => (int) $data['selected_configurable_option'], 'parent_id' => $this->product->id] + 'additional' => [ + 'product_id' => (int) $data['selected_configurable_option'], + 'parent_id' => $this->product->id + ], ] ]; diff --git a/packages/Webkul/Product/src/Type/Grouped.php b/packages/Webkul/Product/src/Type/Grouped.php index 3515f13db..53bae67ce 100644 --- a/packages/Webkul/Product/src/Type/Grouped.php +++ b/packages/Webkul/Product/src/Type/Grouped.php @@ -179,7 +179,7 @@ class Grouped extends AbstractType $cartProducts = $product->getTypeInstance()->prepareForCart([ 'product_id' => $productId, - 'quantity' => $qty, + 'quantity' => $qty, ]); if (is_string($cartProducts)) { diff --git a/packages/Webkul/Product/src/Type/Virtual.php b/packages/Webkul/Product/src/Type/Virtual.php index e13b1f978..32929ad0c 100644 --- a/packages/Webkul/Product/src/Type/Virtual.php +++ b/packages/Webkul/Product/src/Type/Virtual.php @@ -27,7 +27,7 @@ class Virtual extends AbstractType 'admin::catalog.products.accordians.images', 'admin::catalog.products.accordians.categories', 'admin::catalog.products.accordians.channels', - 'admin::catalog.products.accordians.product-links' + 'admin::catalog.products.accordians.product-links', ]; /** diff --git a/packages/Webkul/Product/src/resources/manifest.php b/packages/Webkul/Product/src/resources/manifest.php index 2361976a0..339f89656 100644 --- a/packages/Webkul/Product/src/resources/manifest.php +++ b/packages/Webkul/Product/src/resources/manifest.php @@ -2,5 +2,5 @@ return [ 'name' => 'Webkul Bagisto Product', - 'version' => '0.0.1' + 'version' => '0.0.1', ]; diff --git a/packages/Webkul/Rule/src/Providers/RuleServiceProvider.php b/packages/Webkul/Rule/src/Providers/RuleServiceProvider.php index 2a48f4d5d..f278b8156 100644 --- a/packages/Webkul/Rule/src/Providers/RuleServiceProvider.php +++ b/packages/Webkul/Rule/src/Providers/RuleServiceProvider.php @@ -6,21 +6,4 @@ use Illuminate\Support\ServiceProvider; class RuleServiceProvider extends ServiceProvider { - /** - * Bootstrap services. - * - * @return void - */ - public function boot() - { - } - - /** - * Register services. - * - * @return void - */ - public function register() - { - } } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Config/system.php b/packages/Webkul/Sales/src/Config/system.php index eb741312d..db927acf5 100644 --- a/packages/Webkul/Sales/src/Config/system.php +++ b/packages/Webkul/Sales/src/Config/system.php @@ -16,7 +16,7 @@ return [ 'type' => 'text', 'validation' => false, 'channel_based' => true, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'order_number_length', @@ -24,7 +24,7 @@ return [ 'type' => 'text', 'validation' => 'numeric', 'channel_based' => true, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'order_number_suffix', @@ -32,7 +32,7 @@ return [ 'type' => 'text', 'validation' => false, 'channel_based' => true, - 'locale_based' => true + 'locale_based' => true, ], ] ] diff --git a/packages/Webkul/Sales/src/Models/OrderItem.php b/packages/Webkul/Sales/src/Models/OrderItem.php index 53899977e..2955bf80f 100755 --- a/packages/Webkul/Sales/src/Models/OrderItem.php +++ b/packages/Webkul/Sales/src/Models/OrderItem.php @@ -8,7 +8,13 @@ use Webkul\Product\Models\Product; class OrderItem extends Model implements OrderItemContract { - protected $guarded = ['id', 'child', 'children', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'child', + 'children', + 'created_at', + 'updated_at', + ]; protected $casts = [ 'additional' => 'array', diff --git a/packages/Webkul/Sales/src/Models/OrderPayment.php b/packages/Webkul/Sales/src/Models/OrderPayment.php index b199ad719..8d142d8ed 100755 --- a/packages/Webkul/Sales/src/Models/OrderPayment.php +++ b/packages/Webkul/Sales/src/Models/OrderPayment.php @@ -10,5 +10,9 @@ class OrderPayment extends Model implements OrderPaymentContract { protected $table = 'order_payment'; - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; } \ No newline at end of file diff --git a/packages/Webkul/Sales/src/Models/Refund.php b/packages/Webkul/Sales/src/Models/Refund.php index fa6806ae1..fa70bbc23 100644 --- a/packages/Webkul/Sales/src/Models/Refund.php +++ b/packages/Webkul/Sales/src/Models/Refund.php @@ -7,7 +7,11 @@ use Webkul\Sales\Contracts\Refund as RefundContract; class Refund extends Model implements RefundContract { - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; protected $statusLabel = [ ]; diff --git a/packages/Webkul/Sales/src/Models/RefundItem.php b/packages/Webkul/Sales/src/Models/RefundItem.php index f6fd52b33..a94ccb225 100644 --- a/packages/Webkul/Sales/src/Models/RefundItem.php +++ b/packages/Webkul/Sales/src/Models/RefundItem.php @@ -7,7 +7,11 @@ use Webkul\Sales\Contracts\RefundItem as RefundItemContract; class RefundItem extends Model implements RefundItemContract { - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; protected $casts = [ 'additional' => 'array', diff --git a/packages/Webkul/Sales/src/Models/Shipment.php b/packages/Webkul/Sales/src/Models/Shipment.php index 92971fbe8..1627100a5 100755 --- a/packages/Webkul/Sales/src/Models/Shipment.php +++ b/packages/Webkul/Sales/src/Models/Shipment.php @@ -8,7 +8,11 @@ use Webkul\Sales\Contracts\Shipment as ShipmentContract; class Shipment extends Model implements ShipmentContract { - protected $guarded = ['id', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'created_at', + 'updated_at', + ]; /** * Get the order that belongs to the invoice. diff --git a/packages/Webkul/Sales/src/Models/ShipmentItem.php b/packages/Webkul/Sales/src/Models/ShipmentItem.php index d8b0d1815..9f3f85b58 100755 --- a/packages/Webkul/Sales/src/Models/ShipmentItem.php +++ b/packages/Webkul/Sales/src/Models/ShipmentItem.php @@ -7,7 +7,12 @@ use Webkul\Sales\Contracts\ShipmentItem as ShipmentItemContract; class ShipmentItem extends Model implements ShipmentItemContract { - protected $guarded = ['id', 'child', 'created_at', 'updated_at']; + protected $guarded = [ + 'id', + 'child', + 'created_at', + 'updated_at', + ]; protected $casts = [ 'additional' => 'array', diff --git a/packages/Webkul/Sales/src/Repositories/DownloadableLinkPurchasedRepository.php b/packages/Webkul/Sales/src/Repositories/DownloadableLinkPurchasedRepository.php index befe8d4b7..80ba68351 100644 --- a/packages/Webkul/Sales/src/Repositories/DownloadableLinkPurchasedRepository.php +++ b/packages/Webkul/Sales/src/Repositories/DownloadableLinkPurchasedRepository.php @@ -75,7 +75,7 @@ class DownloadableLinkPurchasedRepository extends Repository 'status' => 'pending', 'customer_id' => $orderItem->order->customer_id, 'order_id' => $orderItem->order_id, - 'order_item_id' => $orderItem->id + 'order_item_id' => $orderItem->id, ]); } } @@ -105,7 +105,7 @@ class DownloadableLinkPurchasedRepository extends Repository foreach ($purchasedLinks as $purchasedLink) { $this->update([ - 'status' => $status + 'status' => $status, ], $purchasedLink->id); } } diff --git a/packages/Webkul/Sales/src/Repositories/InvoiceRepository.php b/packages/Webkul/Sales/src/Repositories/InvoiceRepository.php index 0e22440e7..206bfe8e5 100755 --- a/packages/Webkul/Sales/src/Repositories/InvoiceRepository.php +++ b/packages/Webkul/Sales/src/Repositories/InvoiceRepository.php @@ -107,7 +107,7 @@ class InvoiceRepository extends Repository 'base_currency_code' => $order->base_currency_code, 'channel_currency_code' => $order->channel_currency_code, 'order_currency_code' => $order->order_currency_code, - 'order_address_id' => $order->billing_address->id + 'order_address_id' => $order->billing_address->id, ]); foreach ($data['invoice']['items'] as $itemId => $qty) { @@ -137,7 +137,7 @@ class InvoiceRepository extends Repository 'base_discount_amount' => ( ($orderItem->base_discount_amount / $orderItem->qty_ordered) * $qty ), 'product_id' => $orderItem->product_id, 'product_type' => $orderItem->product_type, - 'additional' => $orderItem->additional + 'additional' => $orderItem->additional, ]); if ($orderItem->getTypeInstance()->isComposite()) { @@ -163,7 +163,7 @@ class InvoiceRepository extends Repository 'base_discount_amount' => 0, 'product_id' => $childOrderItem->product_id, 'product_type' => $childOrderItem->product_type, - 'additional' => $childOrderItem->additional + 'additional' => $childOrderItem->additional, ]); if ($childOrderItem->product @@ -174,7 +174,7 @@ class InvoiceRepository extends Repository 'invoice' => $invoice, 'product' => $childOrderItem->product, 'qty' => $finalQty, - 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0, ]); } @@ -188,7 +188,7 @@ class InvoiceRepository extends Repository 'invoice' => $invoice, 'product' => $orderItem->product, 'qty' => $qty, - 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0, ]); } diff --git a/packages/Webkul/Sales/src/Repositories/OrderItemRepository.php b/packages/Webkul/Sales/src/Repositories/OrderItemRepository.php index 9d725403d..dc792116b 100755 --- a/packages/Webkul/Sales/src/Repositories/OrderItemRepository.php +++ b/packages/Webkul/Sales/src/Repositories/OrderItemRepository.php @@ -130,7 +130,7 @@ class OrderItemRepository extends Repository if ($orderedInventory) { $orderedInventory->update([ - 'qty' => $orderedInventory->qty + $qty + 'qty' => $orderedInventory->qty + $qty, ]); } else { $item->product->ordered_inventories()->create([ diff --git a/packages/Webkul/Sales/src/Repositories/RefundRepository.php b/packages/Webkul/Sales/src/Repositories/RefundRepository.php index d1a7ae826..70806d232 100644 --- a/packages/Webkul/Sales/src/Repositories/RefundRepository.php +++ b/packages/Webkul/Sales/src/Repositories/RefundRepository.php @@ -109,7 +109,7 @@ class RefundRepository extends Repository 'adjustment_fee' => core()->convertPrice($data['refund']['adjustment_fee'], $order->order_currency_code), 'base_adjustment_fee' => $data['refund']['adjustment_fee'], 'shipping_amount' => core()->convertPrice($data['refund']['shipping'], $order->order_currency_code), - 'base_shipping_amount' => $data['refund']['shipping'] + 'base_shipping_amount' => $data['refund']['shipping'], ]); foreach ($data['refund']['items'] as $itemId => $qty) { @@ -139,7 +139,7 @@ class RefundRepository extends Repository 'base_discount_amount' => ( ($orderItem->base_discount_amount / $orderItem->qty_ordered) * $qty ), 'product_id' => $orderItem->product_id, 'product_type' => $orderItem->product_type, - 'additional' => $orderItem->additional + 'additional' => $orderItem->additional, ]); if ($orderItem->getTypeInstance()->isComposite()) { @@ -165,7 +165,7 @@ class RefundRepository extends Repository 'base_discount_amount' => 0, 'product_id' => $childOrderItem->product_id, 'product_type' => $childOrderItem->product_type, - 'additional' => $childOrderItem->additional + 'additional' => $childOrderItem->additional, ]); if ($childOrderItem->getTypeInstance()->isStockable() || $childOrderItem->getTypeInstance()->showQuantityBox()) { @@ -245,11 +245,11 @@ class RefundRepository extends Repository $order = $this->orderRepository->find($orderId); $summary = [ - 'subtotal' => ['price' => 0], - 'discount' => ['price' => 0], - 'tax' => ['price' => 0], - 'shipping' => ['price' => 0], - 'grand_total' => ['price' => 0] + 'subtotal' => ['price' => 0], + 'discount' => ['price' => 0], + 'tax' => ['price' => 0], + 'shipping' => ['price' => 0], + 'grand_total' => ['price' => 0], ]; foreach ($data as $orderItemId => $qty) { diff --git a/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php b/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php index f6d3cf4cd..b7a0d7597 100755 --- a/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php +++ b/packages/Webkul/Sales/src/Repositories/ShipmentRepository.php @@ -140,7 +140,7 @@ class ShipmentRepository extends Repository 'shipment' => $shipment, 'product' => $child->product, 'qty' => $finalQty, - 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0, ]); $this->orderItemRepository->update(['qty_shipped' => $child->qty_shipped + $finalQty], $child->id); @@ -150,7 +150,7 @@ class ShipmentRepository extends Repository 'shipment' => $shipment, 'product' => $orderItem->product, 'qty' => $qty, - 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0 + 'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0, ]); } @@ -159,7 +159,7 @@ class ShipmentRepository extends Repository $shipment->update([ 'total_qty' => $totalQty, - 'inventory_source_name' => $shipment->inventory_source->name + 'inventory_source_name' => $shipment->inventory_source->name, ]); $this->orderRepository->updateOrderStatus($order); diff --git a/packages/Webkul/Shipping/src/Config/carriers.php b/packages/Webkul/Shipping/src/Config/carriers.php index ad47266b6..96e706a4e 100755 --- a/packages/Webkul/Shipping/src/Config/carriers.php +++ b/packages/Webkul/Shipping/src/Config/carriers.php @@ -8,7 +8,7 @@ return [ 'active' => true, 'default_rate' => '10', 'type' => 'per_unit', - 'class' => 'Webkul\Shipping\Carriers\FlatRate' + 'class' => 'Webkul\Shipping\Carriers\FlatRate', ], 'free' => [ @@ -17,6 +17,6 @@ return [ 'description' => 'Free Shipping', 'active' => true, 'default_rate' => '0', - 'class' => 'Webkul\Shipping\Carriers\Free' + 'class' => 'Webkul\Shipping\Carriers\Free', ] ]; \ No newline at end of file diff --git a/packages/Webkul/Shipping/src/Config/system.php b/packages/Webkul/Shipping/src/Config/system.php index 8e85260dc..5e41be967 100755 --- a/packages/Webkul/Shipping/src/Config/system.php +++ b/packages/Webkul/Shipping/src/Config/system.php @@ -4,7 +4,7 @@ return [ [ 'key' => 'sales', 'name' => 'admin::app.admin.system.sales', - 'sort' => 5 + 'sort' => 5, ], [ 'key' => 'sales.carriers', 'name' => 'admin::app.admin.system.shipping-methods', @@ -20,20 +20,20 @@ return [ 'type' => 'text', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'description', 'title' => 'admin::app.admin.system.description', 'type' => 'textarea', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'active', 'title' => 'admin::app.admin.system.status', 'type' => 'boolean', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ] ] ], [ @@ -47,20 +47,20 @@ return [ 'type' => 'text', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'description', 'title' => 'admin::app.admin.system.description', 'type' => 'textarea', 'channel_based' => true, - 'locale_based' => false + 'locale_based' => false, ], [ 'name' => 'default_rate', 'title' => 'admin::app.admin.system.rate', 'type' => 'text', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => false + 'locale_based' => false, ], [ 'name' => 'type', 'title' => 'admin::app.admin.system.type', @@ -68,10 +68,10 @@ return [ 'options' => [ [ 'title' => 'Per Unit', - 'value' => 'per_unit' + 'value' => 'per_unit', ], [ 'title' => 'Per Order', - 'value' => 'per_order' + 'value' => 'per_order', ] ], 'validation' => 'required' @@ -81,13 +81,13 @@ return [ 'type' => 'boolean', 'validation' => 'required', 'channel_based' => false, - 'locale_based' => true + 'locale_based' => true, ] ] ], [ 'key' => 'sales.shipping', 'name' => 'admin::app.admin.system.shipping', - 'sort' => 0 + 'sort' => 0, ], [ 'key' => 'sales.shipping.origin', 'name' => 'admin::app.admin.system.origin', @@ -99,35 +99,35 @@ return [ 'type' => 'country', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'state', 'title' => 'admin::app.admin.system.state', 'type' => 'state', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => true + 'locale_based' => true, ], [ 'name' => 'address1', 'title' => 'admin::app.admin.system.street-address', 'type' => 'text', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => false + 'locale_based' => false, ], [ 'name' => 'zipcode', 'title' => 'admin::app.admin.system.zip', 'type' => 'text', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => false + 'locale_based' => false, ], [ 'name' => 'city', 'title' => 'admin::app.admin.system.city', 'type' => 'text', 'validation' => 'required', 'channel_based' => true, - 'locale_based' => false + 'locale_based' => false, ] ] ] diff --git a/packages/Webkul/Shipping/src/Shipping.php b/packages/Webkul/Shipping/src/Shipping.php index 26effe710..d6926a19c 100755 --- a/packages/Webkul/Shipping/src/Shipping.php +++ b/packages/Webkul/Shipping/src/Shipping.php @@ -48,7 +48,7 @@ class Shipping return [ 'jump_to_section' => 'shipping', 'shippingMethods' => $this->getGroupedAllShippingRates(), - 'html' => view('shop::checkout.onepage.shipping', ['shippingRateGroups' => $this->getGroupedAllShippingRates()])->render() + 'html' => view('shop::checkout.onepage.shipping', ['shippingRateGroups' => $this->getGroupedAllShippingRates()])->render(), ]; } diff --git a/packages/Webkul/Shop/src/Config/menu.php b/packages/Webkul/Shop/src/Config/menu.php index 2fbb31344..7be42bd5f 100755 --- a/packages/Webkul/Shop/src/Config/menu.php +++ b/packages/Webkul/Shop/src/Config/menu.php @@ -5,37 +5,37 @@ return [ 'key' => 'account', 'name' => 'shop::app.layouts.my-account', 'route' =>'customer.profile.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'account.profile', 'name' => 'shop::app.layouts.profile', 'route' =>'customer.profile.index', - 'sort' => 1 + 'sort' => 1, ], [ 'key' => 'account.address', 'name' => 'shop::app.layouts.address', 'route' =>'customer.address.index', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'account.reviews', 'name' => 'shop::app.layouts.reviews', 'route' =>'customer.reviews.index', - 'sort' => 3 + 'sort' => 3, ], [ 'key' => 'account.wishlist', 'name' => 'shop::app.layouts.wishlist', 'route' =>'customer.wishlist.index', - 'sort' => 4 + 'sort' => 4, ], [ 'key' => 'account.orders', 'name' => 'shop::app.layouts.orders', 'route' =>'customer.orders.index', - 'sort' => 5 + 'sort' => 5, ], [ 'key' => 'account.downloadables', 'name' => 'shop::app.layouts.downloadable-products', 'route' =>'customer.downloadable_products.index', - 'sort' => 6 + 'sort' => 6, ] ]; diff --git a/packages/Webkul/Shop/src/DataGrids/DownloadableProductDataGrid.php b/packages/Webkul/Shop/src/DataGrids/DownloadableProductDataGrid.php index 01ea0b03e..d4327d13b 100644 --- a/packages/Webkul/Shop/src/DataGrids/DownloadableProductDataGrid.php +++ b/packages/Webkul/Shop/src/DataGrids/DownloadableProductDataGrid.php @@ -20,10 +20,10 @@ class DownloadableProductDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('downloadable_link_purchased') - ->leftJoin('orders', 'downloadable_link_purchased.order_id', '=', 'orders.id') - ->addSelect('downloadable_link_purchased.*', 'orders.increment_id') - ->addSelect(DB::raw('(' . DB::getTablePrefix() . 'downloadable_link_purchased.download_bought - ' . DB::getTablePrefix() . 'downloadable_link_purchased.download_used) as remaining_downloads')) - ->where('downloadable_link_purchased.customer_id', auth()->guard('customer')->user()->id); + ->leftJoin('orders', 'downloadable_link_purchased.order_id', '=', 'orders.id') + ->addSelect('downloadable_link_purchased.*', 'orders.increment_id') + ->addSelect(DB::raw('(' . DB::getTablePrefix() . 'downloadable_link_purchased.download_bought - ' . DB::getTablePrefix() . 'downloadable_link_purchased.download_used) as remaining_downloads')) + ->where('downloadable_link_purchased.customer_id', auth()->guard('customer')->user()->id); $this->addFilter('status', 'downloadable_link_purchased.status'); $this->addFilter('created_at', 'downloadable_link_purchased.created_at'); @@ -39,7 +39,7 @@ class DownloadableProductDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -65,7 +65,7 @@ class DownloadableProductDataGrid extends DataGrid 'type' => 'datetime', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ diff --git a/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php b/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php index 18c2cdf94..2694b98fa 100644 --- a/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php +++ b/packages/Webkul/Shop/src/DataGrids/OrderDataGrid.php @@ -20,8 +20,8 @@ class OrderDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('orders as order') - ->addSelect('order.id', 'order.increment_id', 'order.status', 'order.created_at', 'order.grand_total', 'order.order_currency_code') - ->where('customer_id', auth()->guard('customer')->user()->id); + ->addSelect('order.id', 'order.increment_id', 'order.status', 'order.created_at', 'order.grand_total', 'order.order_currency_code') + ->where('customer_id', auth()->guard('customer')->user()->id); $this->setQueryBuilder($queryBuilder); } @@ -34,7 +34,7 @@ class OrderDataGrid extends DataGrid 'type' => 'string', 'searchable' => false, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -43,7 +43,7 @@ class OrderDataGrid extends DataGrid 'type' => 'datetime', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -55,7 +55,7 @@ class OrderDataGrid extends DataGrid 'filterable' => true, 'wrapper' => function ($value) { return core()->formatPrice($value->grand_total, $value->order_currency_code); - } + }, ]); $this->addColumn([ @@ -82,7 +82,7 @@ class OrderDataGrid extends DataGrid return 'Fraud'; } }, - 'filterable' => true + 'filterable' => true, ]); } @@ -91,7 +91,7 @@ class OrderDataGrid extends DataGrid 'type' => 'View', 'method' => 'GET', 'route' => 'customer.orders.view', - 'icon' => 'icon eye-icon' + 'icon' => 'icon eye-icon', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 774ef0b76..d750401ce 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -175,21 +175,21 @@ class CartController extends Controller if (Cart::getCart()->coupon_code == $couponCode) { return response()->json([ 'success' => true, - 'message' => trans('shop::app.checkout.total.success-coupon') + 'message' => trans('shop::app.checkout.total.success-coupon'), ]); } } return response()->json([ 'success' => false, - 'message' => trans('shop::app.checkout.total.invalid-coupon') + 'message' => trans('shop::app.checkout.total.invalid-coupon'), ]); } catch (\Exception $e) { report($e); return response()->json([ 'success' => false, - 'message' => trans('shop::app.checkout.total.coupon-apply-issue') + 'message' => trans('shop::app.checkout.total.coupon-apply-issue'), ]); } } @@ -205,7 +205,7 @@ class CartController extends Controller return response()->json([ 'success' => true, - 'message' => trans('shop::app.checkout.total.remove-coupon') + 'message' => trans('shop::app.checkout.total.remove-coupon'), ]); } diff --git a/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php b/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php index 5cf1b2093..a3f4c34f7 100644 --- a/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php @@ -76,7 +76,7 @@ class DownloadableProductController extends Controller if ($downloadableLinkPurchased->download_bought) { $this->downloadableLinkPurchasedRepository->update([ 'download_used' => $downloadableLinkPurchased->download_used + 1, - 'status' => $remainingDownloads <= 0 ? 'expired' : $downloadableLinkPurchased->status + 'status' => $remainingDownloads <= 0 ? 'expired' : $downloadableLinkPurchased->status, ], $downloadableLinkPurchased->id); } diff --git a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php index 87fe91dc8..6179122ba 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php @@ -89,7 +89,7 @@ class OnepageController extends Controller $cart = Cart::getCart(); return response()->json([ - 'html' => view('shop::checkout.total.summary', compact('cart'))->render() + 'html' => view('shop::checkout.total.summary', compact('cart'))->render(), ]); } @@ -166,7 +166,7 @@ class OnepageController extends Controller return response()->json([ 'jump_to_section' => 'review', - 'html' => view('shop::checkout.onepage.review', compact('cart'))->render() + 'html' => view('shop::checkout.onepage.review', compact('cart'))->render(), ]); } @@ -190,7 +190,7 @@ class OnepageController extends Controller if ($redirectUrl = Payment::getRedirectUrl($cart)) { return response()->json([ 'success' => true, - 'redirect_url' => $redirectUrl + 'redirect_url' => $redirectUrl, ]); } @@ -253,7 +253,7 @@ class OnepageController extends Controller public function checkExistCustomer() { $customer = $this->customerRepository->findOneWhere([ - 'email' => request()->email + 'email' => request()->email, ]); if (! is_null($customer)) { @@ -291,7 +291,7 @@ class OnepageController extends Controller public function applyCoupon() { $this->validate(request(), [ - 'code' => 'string|required' + 'code' => 'string|required', ]); $code = request()->input('code'); @@ -304,13 +304,13 @@ class OnepageController extends Controller return response()->json([ 'success' => true, 'message' => trans('shop::app.checkout.total.coupon-applied'), - 'result' => $result + 'result' => $result, ], 200); } else { return response()->json([ 'success' => false, 'message' => trans('shop::app.checkout.total.cannot-apply-coupon'), - 'result' => null + 'result' => null, ], 422); } @@ -333,14 +333,14 @@ class OnepageController extends Controller 'success' => true, 'message' => trans('admin::app.promotion.status.coupon-removed'), 'data' => [ - 'grand_total' => core()->currency(Cart::getCart()->grand_total) - ] + 'grand_total' => core()->currency(Cart::getCart()->grand_total), + ], ], 200); } else { return response()->json([ 'success' => false, 'message' => trans('admin::app.promotion.status.coupon-remove-failed'), - 'data' => null + 'data' => null, ], 422); } } diff --git a/packages/Webkul/Shop/src/Http/Controllers/OrderController.php b/packages/Webkul/Shop/src/Http/Controllers/OrderController.php index 58a47a8de..73c7dd7f3 100644 --- a/packages/Webkul/Shop/src/Http/Controllers/OrderController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/OrderController.php @@ -70,7 +70,7 @@ class OrderController extends Controller { $order = $this->orderRepository->findOneWhere([ 'customer_id' => auth()->guard('customer')->user()->id, - 'id' => $id + 'id' => $id, ]); if (! $order) { diff --git a/packages/Webkul/Shop/src/Http/Controllers/ProductController.php b/packages/Webkul/Shop/src/Http/Controllers/ProductController.php index 99664a85f..1dbd898f4 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/ProductController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/ProductController.php @@ -81,7 +81,7 @@ class ProductController extends Controller { $productAttribute = $this->productAttributeValueRepository->findOneWhere([ 'product_id' => $productId, - 'attribute_id' => $attributeId + 'attribute_id' => $attributeId, ]); return Storage::download($productAttribute['text_value']); diff --git a/packages/Webkul/Shop/src/Http/Controllers/ReviewController.php b/packages/Webkul/Shop/src/Http/Controllers/ReviewController.php index a4b8dd0d7..b11cfc955 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/ReviewController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/ReviewController.php @@ -116,7 +116,7 @@ class ReviewController extends Controller { $review = $this->productReviewRepository->findOneWhere([ 'id' => $id, - 'customer_id' => auth()->guard('customer')->user()->id + 'customer_id' => auth()->guard('customer')->user()->id, ]); if (! $review) { diff --git a/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php b/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php index 856b75076..0ce75bc5d 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/SubscriptionController.php @@ -42,7 +42,7 @@ class SubscriptionController extends Controller public function subscribe() { $this->validate(request(), [ - 'subscriber_email' => 'email|required' + 'subscriber_email' => 'email|required', ]); $email = request()->input('subscriber_email'); @@ -81,7 +81,7 @@ class SubscriptionController extends Controller 'email' => $email, 'channel_id' => core()->getCurrentChannel()->id, 'is_subscribed' => 1, - 'token' => $token + 'token' => $token, ]); if (! $result) { diff --git a/packages/Webkul/Shop/src/Mail/SubscriptionEmail.php b/packages/Webkul/Shop/src/Mail/SubscriptionEmail.php index 1e0f31b52..cca7aba33 100755 --- a/packages/Webkul/Shop/src/Mail/SubscriptionEmail.php +++ b/packages/Webkul/Shop/src/Mail/SubscriptionEmail.php @@ -35,7 +35,7 @@ class SubscriptionEmail extends Mailable ->view('shop::emails.customer.subscription-email') ->with('data', [ 'content' => 'You Are Subscribed', - 'token' => $this->subscriptionData['token'] + 'token' => $this->subscriptionData['token'], ] ); diff --git a/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php b/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php index 445d3d502..a1b48f514 100755 --- a/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php +++ b/packages/Webkul/Tax/src/Http/Controllers/TaxCategoryController.php @@ -79,7 +79,7 @@ class TaxCategoryController extends Controller 'code' => 'required|string|unique:tax_categories,code', 'name' => 'required|string', 'description' => 'required|string', - 'taxrates' => 'array|required' + 'taxrates' => 'array|required', ]); Event::dispatch('tax.tax_category.create.before'); @@ -122,7 +122,7 @@ class TaxCategoryController extends Controller 'code' => 'required|string|unique:tax_categories,code,' . $id, 'name' => 'required|string', 'description' => 'required|string', - 'taxrates' => 'array|required' + 'taxrates' => 'array|required', ]); $data = request()->input(); diff --git a/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php b/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php index f437159ad..918049afe 100755 --- a/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php +++ b/packages/Webkul/Tax/src/Http/Controllers/TaxRateController.php @@ -78,7 +78,7 @@ class TaxRateController extends Controller 'zip_from' => 'nullable|required_with:is_zip', 'zip_to' => 'nullable|required_with:is_zip,zip_from', 'country' => 'required|string', - 'tax_rate' => 'required|numeric|min:0.0001' + 'tax_rate' => 'required|numeric|min:0.0001', ]); $data = request()->all(); @@ -126,7 +126,7 @@ class TaxRateController extends Controller 'zip_from' => 'nullable|required_with:is_zip', 'zip_to' => 'nullable|required_with:is_zip,zip_from', 'country' => 'required|string', - 'tax_rate' => 'required|numeric|min:0.0001' + 'tax_rate' => 'required|numeric|min:0.0001', ]); Event::dispatch('tax.tax_rate.update.before', $id); diff --git a/packages/Webkul/Tax/src/Models/TaxRate.php b/packages/Webkul/Tax/src/Models/TaxRate.php index 21c5dec59..8a845bf7d 100755 --- a/packages/Webkul/Tax/src/Models/TaxRate.php +++ b/packages/Webkul/Tax/src/Models/TaxRate.php @@ -25,7 +25,7 @@ class TaxRate extends Model implements TaxRateContract 'zip_to', 'state', 'country', - 'tax_rate' + 'tax_rate', ]; public function tax_categories() diff --git a/packages/Webkul/Ui/src/DataGrid/DataGrid.php b/packages/Webkul/Ui/src/DataGrid/DataGrid.php index abea96a02..b50a5e0d3 100644 --- a/packages/Webkul/Ui/src/DataGrid/DataGrid.php +++ b/packages/Webkul/Ui/src/DataGrid/DataGrid.php @@ -109,7 +109,7 @@ abstract class DataGrid 'and' => "&", 'bor' => "|", 'regex' => "regexp", - 'notregex' => "not regexp" + 'notregex' => "not regexp", ]; protected $bindings = [ @@ -119,7 +119,7 @@ abstract class DataGrid 3 => "where", 4 => "having", 5 => "order", - 6 => "union" + 6 => "union", ]; protected $selectcomponents = [ @@ -133,7 +133,7 @@ abstract class DataGrid 7 => "orders", 8 => "limit", 9 => "offset", - 10 => "lock" + 10 => "lock", ]; abstract public function prepareQueryBuilder(); @@ -445,7 +445,17 @@ abstract class DataGrid $this->prepareQueryBuilder(); - return view('ui::datagrid.table')->with('results', ['records' => $this->getCollection(), 'columns' => $this->completeColumnDetails, 'actions' => $this->actions, 'massactions' => $this->massActions, 'index' => $this->index, 'enableMassActions' => $this->enableMassAction, 'enableActions' => $this->enableAction, 'paginated' => $this->paginate, 'norecords' => trans('ui::app.datagrid.no-records')]); + return view('ui::datagrid.table')->with('results', [ + 'records' => $this->getCollection(), + 'columns' => $this->completeColumnDetails, + 'actions' => $this->actions, + 'massactions' => $this->massActions, + 'index' => $this->index, + 'enableMassActions' => $this->enableMassAction, + 'enableActions' => $this->enableAction, + 'paginated' => $this->paginate, + 'norecords' => trans('ui::app.datagrid.no-records'), + ]); } public function export() diff --git a/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php b/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php index 25313ed2c..7bdd7928f 100755 --- a/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php +++ b/packages/Webkul/User/src/Database/Seeders/AdminsTableSeeder.php @@ -21,7 +21,7 @@ class AdminsTableSeeder extends Seeder 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s'), 'status' => 1, - 'role_id' => 1 + 'role_id' => 1, ]); } } diff --git a/packages/Webkul/User/src/Database/Seeders/RolesTableSeeder.php b/packages/Webkul/User/src/Database/Seeders/RolesTableSeeder.php index 4c2e5f30f..620446934 100755 --- a/packages/Webkul/User/src/Database/Seeders/RolesTableSeeder.php +++ b/packages/Webkul/User/src/Database/Seeders/RolesTableSeeder.php @@ -18,7 +18,7 @@ class RolesTableSeeder extends Seeder 'id' => 1, 'name' => 'Administrator', 'description' => 'Administrator rolem', - 'permission_type' => 'all' + 'permission_type' => 'all', ]); } } \ No newline at end of file diff --git a/packages/Webkul/User/src/Http/Controllers/AccountController.php b/packages/Webkul/User/src/Http/Controllers/AccountController.php index 10b5ac42e..0c2e9f338 100755 --- a/packages/Webkul/User/src/Http/Controllers/AccountController.php +++ b/packages/Webkul/User/src/Http/Controllers/AccountController.php @@ -54,7 +54,7 @@ class AccountController extends Controller 'name' => 'required', 'email' => 'email|unique:admins,email,' . $user->id, 'password' => 'nullable|min:6|confirmed', - 'current_password' => 'required|min:6' + 'current_password' => 'required|min:6', ]); $data = request()->input(); diff --git a/packages/Webkul/User/src/Http/Controllers/ForgetPasswordController.php b/packages/Webkul/User/src/Http/Controllers/ForgetPasswordController.php index 34d78510a..3d009eaf3 100755 --- a/packages/Webkul/User/src/Http/Controllers/ForgetPasswordController.php +++ b/packages/Webkul/User/src/Http/Controllers/ForgetPasswordController.php @@ -51,7 +51,7 @@ class ForgetPasswordController extends Controller { try { $this->validate(request(), [ - 'email' => 'required|email' + 'email' => 'required|email', ]); $response = $this->broker()->sendResetLink( @@ -66,9 +66,9 @@ class ForgetPasswordController extends Controller return back() ->withInput(request(['email'])) - ->withErrors( - ['email' => trans($response)] - ); + ->withErrors([ + 'email' => trans($response), + ]); } catch(\Exception $e) { session()->flash('error', trans($e->getMessage())); diff --git a/packages/Webkul/User/src/Http/Controllers/ResetPasswordController.php b/packages/Webkul/User/src/Http/Controllers/ResetPasswordController.php index 7b6d66b8a..ad689e9d8 100755 --- a/packages/Webkul/User/src/Http/Controllers/ResetPasswordController.php +++ b/packages/Webkul/User/src/Http/Controllers/ResetPasswordController.php @@ -45,9 +45,10 @@ class ResetPasswordController extends Controller */ public function create($token = null) { - return view($this->_config['view'])->with( - ['token' => $token, 'email' => request('email')] - ); + return view($this->_config['view'])->with([ + 'token' => $token, + 'email' => request('email'), + ]); } /** @@ -77,7 +78,7 @@ class ResetPasswordController extends Controller return back() ->withInput(request(['email'])) ->withErrors([ - 'email' => trans($response) + 'email' => trans($response), ]); } catch(\Exception $e) { session()->flash('error', trans($e->getMessage())); diff --git a/packages/Webkul/User/src/Http/Controllers/SessionController.php b/packages/Webkul/User/src/Http/Controllers/SessionController.php index d90622588..13c9f84c5 100755 --- a/packages/Webkul/User/src/Http/Controllers/SessionController.php +++ b/packages/Webkul/User/src/Http/Controllers/SessionController.php @@ -64,7 +64,7 @@ class SessionController extends Controller { $this->validate(request(), [ 'email' => 'required|email', - 'password' => 'required' + 'password' => 'required', ]); $remember = request('remember'); diff --git a/packages/Webkul/User/src/Http/Requests/UserForm.php b/packages/Webkul/User/src/Http/Requests/UserForm.php index ea22148f7..4a6aeb20e 100755 --- a/packages/Webkul/User/src/Http/Requests/UserForm.php +++ b/packages/Webkul/User/src/Http/Requests/UserForm.php @@ -30,7 +30,7 @@ class UserForm extends FormRequest 'email' => 'email|unique:admins,email', 'password' => 'nullable|confirmed', 'status' => 'sometimes', - 'role_id' => 'required' + 'role_id' => 'required', ]; if ($this->method() == 'PUT') { diff --git a/packages/Webkul/User/src/Models/Role.php b/packages/Webkul/User/src/Models/Role.php index 778e4f784..91640ad85 100755 --- a/packages/Webkul/User/src/Models/Role.php +++ b/packages/Webkul/User/src/Models/Role.php @@ -22,7 +22,7 @@ class Role extends Model implements RoleContract ]; protected $casts = [ - 'permissions' => 'array' + 'permissions' => 'array', ]; /** diff --git a/packages/Webkul/User/src/Notifications/AdminResetPassword.php b/packages/Webkul/User/src/Notifications/AdminResetPassword.php index fcc7dd3ec..131c5e29e 100755 --- a/packages/Webkul/User/src/Notifications/AdminResetPassword.php +++ b/packages/Webkul/User/src/Notifications/AdminResetPassword.php @@ -22,7 +22,7 @@ class AdminResetPassword extends ResetPassword return (new MailMessage) ->view('shop::emails.admin.forget-password', [ 'user_name' => $notifiable->name, - 'token' => $this->token + 'token' => $this->token, ]); } } diff --git a/packages/Webkul/Velocity/src/Config/admin-menu.php b/packages/Webkul/Velocity/src/Config/admin-menu.php index 34f0060ac..bc826062c 100644 --- a/packages/Webkul/Velocity/src/Config/admin-menu.php +++ b/packages/Webkul/Velocity/src/Config/admin-menu.php @@ -6,18 +6,18 @@ return [ 'name' => 'velocity::app.admin.layouts.velocity', 'route' => 'velocity.admin.content.index', 'sort' => 5, - 'icon-class' => 'velocity-icon' + 'icon-class' => 'velocity-icon', ], [ 'key' => 'velocity.meta-data', 'name' => 'velocity::app.admin.layouts.meta-data', 'route' => 'velocity.admin.meta-data', 'sort' => 1, - 'icon-class' => '' + 'icon-class' => '', ], [ 'key' => 'velocity.header', 'name' => 'velocity::app.admin.layouts.header-content', 'route' => 'velocity.admin.content.index', 'sort' => 2, - 'icon-class' => '' + 'icon-class' => '', ], ]; \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Config/system.php b/packages/Webkul/Velocity/src/Config/system.php index 8946c3340..bde107420 100644 --- a/packages/Webkul/Velocity/src/Config/system.php +++ b/packages/Webkul/Velocity/src/Config/system.php @@ -4,7 +4,7 @@ return [ [ 'key' => 'velocity', 'name' => 'velocity::app.admin.system.velocity.extension_name', - 'sort' => 2 + 'sort' => 2, ], [ 'key' => 'velocity.configuration', 'name' => 'velocity::app.admin.system.velocity.settings', @@ -21,10 +21,10 @@ return [ 'options' => [ [ 'title' => 'velocity::app.admin.system.general.active', - 'value' => true + 'value' => true, ], [ 'title' => 'velocity::app.admin.system.general.inactive', - 'value' => false + 'value' => false, ] ] ] @@ -41,10 +41,10 @@ return [ 'options' => [ [ 'title' => 'velocity::app.admin.system.category.active', - 'value' => true + 'value' => true, ], [ 'title' => 'velocity::app.admin.system.category.inactive', - 'value' => false + 'value' => false, ] ] ], [ @@ -54,10 +54,10 @@ return [ 'options' => [ [ 'title' => 'velocity::app.admin.system.category.active', - 'value' => true + 'value' => true, ], [ 'title' => 'velocity::app.admin.system.category.inactive', - 'value' => false + 'value' => false, ] ] ], [ @@ -86,10 +86,10 @@ return [ 'options' => [ [ 'title' => 'Right', - 'value' => 'right' + 'value' => 'right', ], [ 'title' => 'Left', - 'value' => 'left' + 'value' => 'left', ] ] ], [ @@ -99,10 +99,10 @@ return [ 'options' => [ [ 'title' => 'velocity::app.admin.system.category.active', - 'value' => true + 'value' => true, ], [ 'title' => 'velocity::app.admin.system.category.inactive', - 'value' => false + 'value' => false, ] ] ], [ @@ -114,10 +114,10 @@ return [ 'options' => [ [ 'title' => 'All', - 'value' => 'all' + 'value' => 'all', ], [ 'title' => 'Custom', - 'value' => 'custom' + 'value' => 'custom', ] ] ], [ diff --git a/packages/Webkul/Velocity/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Velocity/src/DataGrids/CategoryDataGrid.php index de25d6a77..c9fb1929b 100644 --- a/packages/Webkul/Velocity/src/DataGrids/CategoryDataGrid.php +++ b/packages/Webkul/Velocity/src/DataGrids/CategoryDataGrid.php @@ -22,14 +22,14 @@ class CategoryDataGrid extends DataGrid $defaultChannel = core()->getCurrentChannel(); $queryBuilder = DB::table('velocity_category as v_cat') - ->select('v_cat.id as category_menu_id', 'v_cat.category_id', 'ct.name', 'v_cat.icon', 'v_cat.tooltip', 'v_cat.status') - ->leftJoin('categories as c', 'c.id', '=', 'v_cat.category_id') - ->leftJoin('category_translations as ct', function($leftJoin) { - $leftJoin->on('c.id', '=', 'ct.category_id') - ->where('ct.locale', app()->getLocale()); - }) - ->where('c.parent_id', $defaultChannel->root_category_id) - ->groupBy('v_cat.id'); + ->select('v_cat.id as category_menu_id', 'v_cat.category_id', 'ct.name', 'v_cat.icon', 'v_cat.tooltip', 'v_cat.status') + ->leftJoin('categories as c', 'c.id', '=', 'v_cat.category_id') + ->leftJoin('category_translations as ct', function($leftJoin) { + $leftJoin->on('c.id', '=', 'ct.category_id') + ->where('ct.locale', app()->getLocale()); + }) + ->where('c.parent_id', $defaultChannel->root_category_id) + ->groupBy('v_cat.id'); // $this->addFilter('content_id', 'con.id'); @@ -44,7 +44,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -53,7 +53,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -66,7 +66,7 @@ class CategoryDataGrid extends DataGrid 'closure' => true, 'wrapper' => function ($row) { return ''; - } + }, ]); $this->addColumn([ @@ -83,7 +83,7 @@ class CategoryDataGrid extends DataGrid } else { return 'Disabled'; } - } + }, ]); } @@ -92,7 +92,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'Edit', 'method' => 'GET', 'route' => 'velocity.admin.category.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -100,7 +100,7 @@ class CategoryDataGrid extends DataGrid 'method' => 'POST', 'route' => 'velocity.admin.category.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'Category']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -110,7 +110,7 @@ class CategoryDataGrid extends DataGrid 'type' => 'delete', 'action' => route('velocity.admin.category.mass-delete'), 'label' => trans('admin::app.datagrid.delete'), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); } } diff --git a/packages/Webkul/Velocity/src/DataGrids/ContentDataGrid.php b/packages/Webkul/Velocity/src/DataGrids/ContentDataGrid.php index 86e897e87..060f89c43 100644 --- a/packages/Webkul/Velocity/src/DataGrids/ContentDataGrid.php +++ b/packages/Webkul/Velocity/src/DataGrids/ContentDataGrid.php @@ -20,12 +20,12 @@ class ContentDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = DB::table('velocity_contents as con') - ->select('con.id as content_id', 'con_trans.title', 'con.position', 'con.content_type', 'con.status') - ->leftJoin('velocity_contents_translations as con_trans', function($leftJoin) { - $leftJoin->on('con.id', '=', 'con_trans.content_id') - ->where('con_trans.locale', app()->getLocale()); - }) - ->groupBy('con.id'); + ->select('con.id as content_id', 'con_trans.title', 'con.position', 'con.content_type', 'con.status') + ->leftJoin('velocity_contents_translations as con_trans', function($leftJoin) { + $leftJoin->on('con.id', '=', 'con_trans.content_id') + ->where('con_trans.locale', app()->getLocale()); + }) + ->groupBy('con.id'); $this->addFilter('content_id', 'con.id'); @@ -40,7 +40,7 @@ class ContentDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -49,7 +49,7 @@ class ContentDataGrid extends DataGrid 'type' => 'string', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -58,7 +58,7 @@ class ContentDataGrid extends DataGrid 'type' => 'number', 'searchable' => true, 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -74,7 +74,7 @@ class ContentDataGrid extends DataGrid } else { return 'Inactive'; } - } + }, ]); $this->addColumn([ @@ -94,7 +94,7 @@ class ContentDataGrid extends DataGrid } elseif ($value->content_type == 'static') { return 'Static'; } - } + }, ]); } @@ -103,7 +103,7 @@ class ContentDataGrid extends DataGrid 'type' => 'Edit', 'method' => 'GET', 'route' => 'velocity.admin.content.edit', - 'icon' => 'icon pencil-lg-icon' + 'icon' => 'icon pencil-lg-icon', ]); $this->addAction([ @@ -111,7 +111,7 @@ class ContentDataGrid extends DataGrid 'method' => 'POST', 'route' => 'velocity.admin.content.delete', 'confirm_text' => trans('ui::app.datagrid.massaction.delete', ['resource' => 'content']), - 'icon' => 'icon trash-icon' + 'icon' => 'icon trash-icon', ]); } @@ -121,7 +121,7 @@ class ContentDataGrid extends DataGrid 'type' => 'delete', 'action' => route('velocity.admin.content.mass-delete'), 'label' => trans('admin::app.datagrid.delete'), - 'method' => 'DELETE' + 'method' => 'DELETE', ]); } } diff --git a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php index 1a3b32817..ca0c72863 100644 --- a/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php +++ b/packages/Webkul/Velocity/src/Database/Seeders/VelocityMetaDataSeeder.php @@ -12,7 +12,7 @@ class VelocityMetaDataSeeder extends Seeder DB::table('velocity_meta_data')->delete(); DB::table('velocity_meta_data')->insert([ - 'id' => 1, + 'id' => 1, 'home_page_content' => "

@include('shop::home.advertisements.advertisement-four')@include('shop::home.featured-products') @include('shop::home.product-policy') @include('shop::home.advertisements.advertisement-three') @include('shop::home.new-products') @include('shop::home.advertisements.advertisement-two')

", 'footer_left_content' => trans('velocity::app.admin.meta-data.footer-left-raw-content'), diff --git a/packages/Webkul/Velocity/src/Helpers/Helper.php b/packages/Webkul/Velocity/src/Helpers/Helper.php index 684be75dd..66d0dc4ea 100644 --- a/packages/Webkul/Velocity/src/Helpers/Helper.php +++ b/packages/Webkul/Velocity/src/Helpers/Helper.php @@ -254,8 +254,8 @@ class Helper extends Review 'addToCartHtml' => view('shop::products.add-to-cart', [ 'product' => $product, 'showCompare' => true, - 'addWishlistClass' => !(isset($list) && $list) ? '' : '', - 'addToCartBtnClass' => !(isset($list) && $list) ? 'small-padding' : '', + 'addWishlistClass' => ! (isset($list) && $list) ? '' : '', + 'addToCartBtnClass' => ! (isset($list) && $list) ? 'small-padding' : '', ])->render(), ]; } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php b/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php index ed3561f32..1dea71009 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Admin/ConfigurationController.php @@ -48,7 +48,7 @@ class ConfigurationController extends Controller } return view($this->_config['view'], [ - 'metaData' => $velocityMetaData + 'metaData' => $velocityMetaData, ]); } @@ -57,11 +57,11 @@ class ConfigurationController extends Controller // check if radio button value if (request()->get('slides') == "on") { $params = request()->all() + [ - 'slider' => 1 + 'slider' => 1, ]; } else { $params = request()->all() + [ - 'slider' => 0 + 'slider' => 0, ]; } @@ -183,7 +183,7 @@ class ConfigurationController extends Controller 'id' => $key, 'type' => null, 'path' => $image, - 'url' => Storage::url($image) + 'url' => Storage::url($image), ]; } } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php index 16d92e632..973bc3d1f 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/CartController.php @@ -69,7 +69,7 @@ class CartController extends Controller } $response = [ - 'status' => true, + 'status' => true, 'mini_cart' => [ 'cart_items' => $cartItems, 'cart_details' => $cartDetails, @@ -99,7 +99,7 @@ class CartController extends Controller if (is_array($cart) && isset($cart['warning'])) { $response = [ - 'status' => 'warning', + 'status' => 'warning', 'message' => $cart['warning'], ]; } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php index a1fc01fdd..18a5634ac 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ComparisonController.php @@ -129,27 +129,27 @@ class ComparisonController extends Controller $customerId = auth()->guard('customer')->user()->id; $compareProduct = $this->velocityCompareProductsRepository->findOneByField([ - 'customer_id' => $customerId, + 'customer_id' => $customerId, 'product_flat_id' => $productId, ]); if (! $compareProduct) { // insert new row $this->velocityCompareProductsRepository->create([ - 'customer_id' => $customerId, - 'product_flat_id' => $productId, + 'customer_id' => $customerId, + 'product_flat_id' => $productId, ]); return response()->json([ - 'status' => 'success', - 'message' => trans('velocity::app.customer.compare.added'), - 'label' => trans('velocity::app.shop.general.alert.success'), + 'status' => 'success', + 'message' => trans('velocity::app.customer.compare.added'), + 'label' => trans('velocity::app.shop.general.alert.success'), ], 201); } else { return response()->json([ - 'status' => 'success', - 'label' => trans('velocity::app.shop.general.alert.success'), - 'message' => trans('velocity::app.customer.compare.already_added'), + 'status' => 'success', + 'label' => trans('velocity::app.shop.general.alert.success'), + 'message' => trans('velocity::app.customer.compare.already_added'), ], 200); } } @@ -172,7 +172,7 @@ class ComparisonController extends Controller // delete individual $this->velocityCompareProductsRepository->deleteWhere([ 'product_flat_id' => request()->get('productId'), - 'customer_id' => auth()->guard('customer')->user()->id, + 'customer_id' => auth()->guard('customer')->user()->id, ]); } diff --git a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php index df47570a7..1eff57135 100644 --- a/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php +++ b/packages/Webkul/Velocity/src/Http/Controllers/Shop/ShopController.php @@ -158,7 +158,7 @@ class ShopController extends Controller } $response = [ - 'status' => true, + 'status' => true, 'products' => $formattedProducts, ]; diff --git a/packages/Webkul/Velocity/src/Models/Category.php b/packages/Webkul/Velocity/src/Models/Category.php index 9c764a063..b2c932042 100644 --- a/packages/Webkul/Velocity/src/Models/Category.php +++ b/packages/Webkul/Velocity/src/Models/Category.php @@ -10,5 +10,10 @@ class Category extends Model implements CategoryContract protected $table = 'velocity_category'; - protected $fillable = ['category_id', 'icon', 'tooltip', 'status']; + protected $fillable = [ + 'category_id', + 'icon', + 'tooltip', + 'status', + ]; } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Models/Content.php b/packages/Webkul/Velocity/src/Models/Content.php index 24e7bf580..886e8937a 100644 --- a/packages/Webkul/Velocity/src/Models/Content.php +++ b/packages/Webkul/Velocity/src/Models/Content.php @@ -18,10 +18,14 @@ class Content extends TranslatableModel implements ContentContract 'link_target', 'catalog_type', 'products', - 'description' + 'description', ]; - protected $fillable = ['content_type', 'position', 'status']; + protected $fillable = [ + 'content_type', + 'position', + 'status', + ]; protected $with = ['translations']; } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Models/ContentTranslation.php b/packages/Webkul/Velocity/src/Models/ContentTranslation.php index e6d414bdf..18078cfd7 100644 --- a/packages/Webkul/Velocity/src/Models/ContentTranslation.php +++ b/packages/Webkul/Velocity/src/Models/ContentTranslation.php @@ -20,7 +20,7 @@ class ContentTranslation extends Model implements ContentTranslationContract 'link_target', 'catalog_type', 'products', - 'description' + 'description', ]; public function content() diff --git a/packages/Webkul/Velocity/src/Models/OrderBrands.php b/packages/Webkul/Velocity/src/Models/OrderBrands.php index 26293cc61..da145f466 100644 --- a/packages/Webkul/Velocity/src/Models/OrderBrands.php +++ b/packages/Webkul/Velocity/src/Models/OrderBrands.php @@ -12,7 +12,12 @@ class OrderBrands extends Model implements OrderBrandContract protected $table = 'order_brands'; - protected $fillable = ['order_item_id','order_id','product_id','brand']; + protected $fillable = [ + 'order_item_id', + 'order_id', + 'product_id', + 'brand', + ]; public function getBrands() { diff --git a/packages/Webkul/Velocity/src/Providers/ModuleServiceProvider.php b/packages/Webkul/Velocity/src/Providers/ModuleServiceProvider.php index 5dc48c36b..943105d3c 100644 --- a/packages/Webkul/Velocity/src/Providers/ModuleServiceProvider.php +++ b/packages/Webkul/Velocity/src/Providers/ModuleServiceProvider.php @@ -8,6 +8,6 @@ class ModuleServiceProvider extends BaseModuleServiceProvider { protected $models = [ \Webkul\Velocity\Models\Content::class, - \Webkul\Velocity\Models\Category::class + \Webkul\Velocity\Models\Category::class, ]; } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Repositories/ContentRepository.php b/packages/Webkul/Velocity/src/Repositories/ContentRepository.php index 92124f764..fde5a9398 100644 --- a/packages/Webkul/Velocity/src/Repositories/ContentRepository.php +++ b/packages/Webkul/Velocity/src/Repositories/ContentRepository.php @@ -123,13 +123,13 @@ class ContentRepository extends Repository $query = $this->model::orderBy('position', 'ASC'); $contentCollection = $query - ->select('velocity_contents.*', 'velocity_contents_translations.*') - ->where('velocity_contents.status', 1) - ->leftJoin('velocity_contents_translations', 'velocity_contents.id', 'velocity_contents_translations.content_id') - ->distinct('velocity_contents_translations.id') - ->where('velocity_contents_translations.locale', app()->getLocale()) - ->limit(5) - ->get(); + ->select('velocity_contents.*', 'velocity_contents_translations.*') + ->where('velocity_contents.status', 1) + ->leftJoin('velocity_contents_translations', 'velocity_contents.id', 'velocity_contents_translations.content_id') + ->distinct('velocity_contents_translations.id') + ->where('velocity_contents_translations.locale', app()->getLocale()) + ->limit(5) + ->get(); $formattedContent = []; diff --git a/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php b/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php index c2d130ed3..ff1e7617c 100644 --- a/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php +++ b/packages/Webkul/Velocity/src/Repositories/Product/ProductRepository.php @@ -55,13 +55,13 @@ class ProductRepository extends Repository $locale = request()->get('locale') ?: app()->getLocale(); return $query->distinct() - ->addSelect('product_flat.*') - ->where('product_flat.status', 1) - ->where('product_flat.visible_individually', 1) - ->where('product_flat.featured', 1) - ->where('product_flat.channel', $channel) - ->where('product_flat.locale', $locale) - ->orderBy('product_id', 'desc'); + ->addSelect('product_flat.*') + ->where('product_flat.status', 1) + ->where('product_flat.visible_individually', 1) + ->where('product_flat.featured', 1) + ->where('product_flat.channel', $channel) + ->where('product_flat.locale', $locale) + ->orderBy('product_id', 'desc'); })->paginate($count); return $results; @@ -80,13 +80,13 @@ class ProductRepository extends Repository $locale = request()->get('locale') ?: app()->getLocale(); return $query->distinct() - ->addSelect('product_flat.*') - ->where('product_flat.status', 1) - ->where('product_flat.visible_individually', 1) - ->where('product_flat.new', 1) - ->where('product_flat.channel', $channel) - ->where('product_flat.locale', $locale) - ->orderBy('product_id', 'desc'); + ->addSelect('product_flat.*') + ->where('product_flat.status', 1) + ->where('product_flat.visible_individually', 1) + ->where('product_flat.new', 1) + ->where('product_flat.channel', $channel) + ->where('product_flat.locale', $locale) + ->orderBy('product_id', 'desc'); })->paginate($count); return $results; @@ -144,7 +144,7 @@ class ProductRepository extends Repository $query = $query->where(function($query1) use($query) { $aliases = [ 'products' => 'filter_', - 'variants' => 'variant_filter_' + 'variants' => 'variant_filter_', ]; foreach($aliases as $table => $alias) {