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' => '
@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) {