Improved code style
This commit is contained in:
commit
41e06d5dc5
42
README.md
42
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:
|
||||
|
|
|
|||
|
|
@ -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'))),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class ResourceController extends Controller
|
|||
$this->repository->delete($id);
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Item removed successfully.'
|
||||
'message' => 'Item removed successfully.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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)),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -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' => '',
|
||||
]
|
||||
];
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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 '<span class="badge badge-md badge-danger">'. trans('admin::app.customers.customers.inactive') .'</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -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,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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 '<span class="badge badge-md badge-danger">'. trans('admin::app.sales.orders.order-status-fraud') . '</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
||||
$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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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.',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
];
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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;');
|
||||
|
|
|
|||
|
|
@ -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;');
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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']));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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']));
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -18,14 +18,4 @@ class AttributeServiceProvider extends ServiceProvider
|
|||
|
||||
$this->app->make(EloquentFactory::class)->load(__DIR__ . '/../Database/Factories');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -176,7 +176,7 @@ class AttributeFamilyRepository extends Repository
|
|||
$trimmed[$key] = [
|
||||
'id' => $attributeFamily->id,
|
||||
'code' => $attributeFamily->code,
|
||||
'name' => $attributeFamily->name
|
||||
'name' => $attributeFamily->name,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ return [
|
|||
'key' => 'booking',
|
||||
'name' => 'Booking',
|
||||
'class' => 'Webkul\BookingProduct\Type\Booking',
|
||||
'sort' => 7
|
||||
'sort' => 7,
|
||||
]
|
||||
];
|
||||
|
|
@ -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')),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
|
@ -9,5 +9,8 @@ class BookingProductEventTicketTranslation extends Model implements BookingProdu
|
|||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['name', 'description'];
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'description',
|
||||
];
|
||||
}
|
||||
|
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
|
@ -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,
|
||||
];
|
||||
}
|
||||
|
|
@ -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,
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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' => '<div class="static-container">
|
||||
<div class="mb-5">About us page content</div>
|
||||
</div>',
|
||||
'page_title' => 'About Us',
|
||||
'meta_title' => 'about us',
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 1,
|
||||
'url_key' => 'about-us',
|
||||
'html_content' => '<div class="static-container"><div class="mb-5">About us page content</div></div>',
|
||||
'page_title' => 'About Us',
|
||||
'meta_title' => 'about us',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'aboutus'
|
||||
'meta_keywords' => 'aboutus',
|
||||
], [
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 2,
|
||||
'url_key' => 'return-policy',
|
||||
'html_content' => '<div class="static-container">
|
||||
<div class="mb-5">Return policy page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Return Policy',
|
||||
'meta_title' => 'return policy',
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 2,
|
||||
'url_key' => 'return-policy',
|
||||
'html_content' => '<div class="static-container"><div class="mb-5">Return policy page content</div></div>',
|
||||
'page_title' => 'Return Policy',
|
||||
'meta_title' => 'return policy',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'return, policy'
|
||||
'meta_keywords' => 'return, policy',
|
||||
], [
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 3,
|
||||
'url_key' => 'refund-policy',
|
||||
'html_content' => '<div class="static-container">
|
||||
<div class="mb-5">Refund policy page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Refund Policy',
|
||||
'meta_title' => 'Refund policy',
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 3,
|
||||
'url_key' => 'refund-policy',
|
||||
'html_content' => '<div class="static-container"><div class="mb-5">Refund policy page content</div></div>',
|
||||
'page_title' => 'Refund Policy',
|
||||
'meta_title' => 'Refund policy',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'refund, policy'
|
||||
'meta_keywords' => 'refund, policy',
|
||||
], [
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 4,
|
||||
'url_key' => 'terms-conditions',
|
||||
'html_content' => '<div class="static-container">
|
||||
<div class="mb-5">Terms & conditions page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Terms & Conditions',
|
||||
'meta_title' => 'Terms & Conditions',
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 4,
|
||||
'url_key' => 'terms-conditions',
|
||||
'html_content' => '<div class="static-container"><div class="mb-5">Terms & conditions page content</div></div>',
|
||||
'page_title' => 'Terms & Conditions',
|
||||
'meta_title' => 'Terms & Conditions',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'term, conditions'
|
||||
'meta_keywords' => 'term, conditions',
|
||||
], [
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 5,
|
||||
'url_key' => 'terms-of-use',
|
||||
'html_content' => '<div class="static-container">
|
||||
<div class="mb-5">Terms of use page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Terms of use',
|
||||
'meta_title' => 'Terms of use',
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 5,
|
||||
'url_key' => 'terms-of-use',
|
||||
'html_content' => '<div class="static-container"><div class="mb-5">Terms of use page content</div></div>',
|
||||
'page_title' => 'Terms of use',
|
||||
'meta_title' => 'Terms of use',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'term, use'
|
||||
'meta_keywords' => 'term, use',
|
||||
], [
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 6,
|
||||
'url_key' => 'contact-us',
|
||||
'html_content' => '<div class="static-container">
|
||||
<div class="mb-5">Contact us page content</div>
|
||||
</div>',
|
||||
'page_title' => 'Contact Us',
|
||||
'meta_title' => 'Contact Us',
|
||||
'locale' => 'en',
|
||||
'cms_page_id' => 6,
|
||||
'url_key' => 'contact-us',
|
||||
'html_content' => '<div class="static-container"><div class="mb-5">Contact us page content</div></div>',
|
||||
'page_title' => 'Contact Us',
|
||||
'meta_title' => 'Contact Us',
|
||||
'meta_description' => '',
|
||||
'meta_keywords' => 'contact, us'
|
||||
'meta_keywords' => 'contact, us',
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ use Webkul\CMS\Repositories\CmsRepository;
|
|||
'url_key' => ['required', 'unique:cms_page_translations,url_key', new \Webkul\Core\Contracts\Validations\Slug],
|
||||
'page_title' => 'required',
|
||||
'channels' => 'required',
|
||||
'html_content' => 'required'
|
||||
'html_content' => 'required',
|
||||
]);
|
||||
|
||||
$page = $this->cmsRepository->create(request()->all());
|
||||
|
|
@ -116,7 +116,7 @@ use Webkul\CMS\Repositories\CmsRepository;
|
|||
}],
|
||||
$locale . '.page_title' => 'required',
|
||||
$locale . '.html_content' => 'required',
|
||||
'channels' => 'required'
|
||||
'channels' => 'required',
|
||||
]);
|
||||
|
||||
$this->cmsRepository->update(request()->all(), $id);
|
||||
|
|
@ -174,11 +174,11 @@ use Webkul\CMS\Repositories\CmsRepository;
|
|||
|
||||
if (count($pageIDs) == $count) {
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.delete-success', [
|
||||
'resource' => 'CMS Pages'
|
||||
'resource' => 'CMS Pages',
|
||||
]));
|
||||
} else {
|
||||
session()->flash('success', trans('admin::app.datagrid.mass-ops.partial-action', [
|
||||
'resource' => 'CMS Pages'
|
||||
'resource' => 'CMS Pages',
|
||||
]));
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class CartRuleController extends Controller
|
|||
'starts_from' => 'nullable|date',
|
||||
'ends_till' => 'nullable|date|after_or_equal:starts_from',
|
||||
'action_type' => 'required',
|
||||
'discount_amount' => 'required|numeric'
|
||||
'discount_amount' => 'required|numeric',
|
||||
]);
|
||||
|
||||
$data = request()->all();
|
||||
|
|
@ -143,7 +143,7 @@ class CartRuleController extends Controller
|
|||
'starts_from' => 'nullable|date',
|
||||
'ends_till' => 'nullable|date|after_or_equal:starts_from',
|
||||
'action_type' => 'required',
|
||||
'discount_amount' => 'required|numeric'
|
||||
'discount_amount' => 'required|numeric',
|
||||
]);
|
||||
|
||||
$cartRule = $this->cartRuleRepository->findOrFail($id);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class Order
|
|||
|
||||
$ruleCustomer = $this->cartRuleCustomerRepository->findOneWhere([
|
||||
'customer_id' => $order->customer_id,
|
||||
'cart_rule_id' => $ruleId
|
||||
'cart_rule_id' => $ruleId,
|
||||
]);
|
||||
|
||||
if ($ruleCustomer) {
|
||||
|
|
@ -108,7 +108,7 @@ class Order
|
|||
$this->cartRuleCustomerRepository->create([
|
||||
'customer_id' => $order->customer_id,
|
||||
'cart_rule_id' => $ruleId,
|
||||
'times_used' => 1
|
||||
'times_used' => 1,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -125,7 +125,7 @@ class Order
|
|||
if ($order->customer_id) {
|
||||
$couponUsage = $this->cartRuleCouponUsageRepository->findOneWhere([
|
||||
'customer_id' => $order->customer_id,
|
||||
'cart_rule_coupon_id' => $coupon->id
|
||||
'cart_rule_coupon_id' => $coupon->id,
|
||||
]);
|
||||
|
||||
if ($couponUsage) {
|
||||
|
|
@ -134,7 +134,7 @@ class Order
|
|||
$this->cartRuleCouponUsageRepository->create([
|
||||
'customer_id' => $order->customer_id,
|
||||
'cart_rule_coupon_id' => $coupon->id,
|
||||
'times_used' => 1
|
||||
'times_used' => 1,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,8 @@ class CartRuleCouponUsage extends Model implements CartRuleCouponUsageContract
|
|||
|
||||
protected $table = 'cart_rule_coupon_usage';
|
||||
|
||||
protected $guarded = ['created_at', 'updated_at'];
|
||||
protected $guarded = [
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
}
|
||||
|
|
@ -9,5 +9,9 @@ class CartRuleCustomer extends Model implements CartRuleCustomerContract
|
|||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['times_used', 'cart_rule_id', 'customer_id'];
|
||||
protected $fillable = [
|
||||
'times_used',
|
||||
'cart_rule_id',
|
||||
'customer_id',
|
||||
];
|
||||
}
|
||||
|
|
@ -18,13 +18,4 @@ class CartRuleServiceProvider extends ServiceProvider
|
|||
|
||||
$this->app->register(EventServiceProvider::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ class CartRuleCouponRepository extends Repository
|
|||
protected $charsets = [
|
||||
'alphanumeric' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
|
||||
'alphabetical' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
||||
'numeric' => '0123456789'
|
||||
'numeric' => '0123456789',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -49,7 +49,7 @@ class CartRuleCouponRepository extends Repository
|
|||
'usage_limit' => $cartRule->uses_per_coupon ?? 0,
|
||||
'usage_per_customer' => $cartRule->usage_per_customer ?? 0,
|
||||
'is_primary' => 0,
|
||||
'expired_at' => $cartRule->ends_till ?: null
|
||||
'expired_at' => $cartRule->ends_till ?: null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class CartRuleRepository extends Repository
|
|||
'usage_limit' => $data['usage_per_customer'] ?? 0,
|
||||
'usage_per_customer' => $data['usage_per_customer'] ?? 0,
|
||||
'is_primary' => 1,
|
||||
'expired_at' => $data['ends_till'] ?: null
|
||||
'expired_at' => $data['ends_till'] ?: null,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ class CartRuleRepository extends Repository
|
|||
'code' => $data['coupon_code'],
|
||||
'usage_limit' => $data['uses_per_coupon'] ?? 0,
|
||||
'usage_per_customer' => $data['usage_per_customer'] ?? 0,
|
||||
'expired_at' => $data['ends_till'] ?: null
|
||||
'expired_at' => $data['ends_till'] ?: null,
|
||||
], $cartRuleCoupon->id);
|
||||
} else {
|
||||
$this->cartRuleCouponRepository->create([
|
||||
|
|
@ -193,7 +193,7 @@ class CartRuleRepository extends Repository
|
|||
'usage_limit' => $data['uses_per_coupon'] ?? 0,
|
||||
'usage_per_customer' => $data['usage_per_customer'] ?? 0,
|
||||
'is_primary' => 1,
|
||||
'expired_at' => $data['ends_till'] ?: null
|
||||
'expired_at' => $data['ends_till'] ?: null,
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -202,7 +202,7 @@ class CartRuleRepository extends Repository
|
|||
$this->cartRuleCouponRepository->getModel()->where('cart_rule_id', $cartRule->id)->update([
|
||||
'usage_limit' => $data['uses_per_coupon'] ?? 0,
|
||||
'usage_per_customer' => $data['usage_per_customer'] ?? 0,
|
||||
'expired_at' => $data['ends_till'] ?: null
|
||||
'expired_at' => $data['ends_till'] ?: null,
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -227,35 +227,35 @@ class CartRuleRepository extends Repository
|
|||
[
|
||||
'key' => 'cart|base_sub_total',
|
||||
'type' => 'price',
|
||||
'label' => trans('admin::app.promotions.cart-rules.subtotal')
|
||||
'label' => trans('admin::app.promotions.cart-rules.subtotal'),
|
||||
], [
|
||||
'key' => 'cart|items_qty',
|
||||
'type' => 'integer',
|
||||
'label' => trans('admin::app.promotions.cart-rules.total-items-qty')
|
||||
'label' => trans('admin::app.promotions.cart-rules.total-items-qty'),
|
||||
], [
|
||||
'key' => 'cart|payment_method',
|
||||
'type' => 'select',
|
||||
'options' => $this->getPaymentMethods(),
|
||||
'label' => trans('admin::app.promotions.cart-rules.payment-method')
|
||||
'label' => trans('admin::app.promotions.cart-rules.payment-method'),
|
||||
], [
|
||||
'key' => 'cart|shipping_method',
|
||||
'type' => 'select',
|
||||
'options' => $this->getShippingMethods(),
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-method')
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-method'),
|
||||
], [
|
||||
'key' => 'cart|postcode',
|
||||
'type' => 'text',
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-postcode')
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-postcode'),
|
||||
], [
|
||||
'key' => 'cart|state',
|
||||
'type' => 'select',
|
||||
'options' => $this->groupedStatesByCountries(),
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-state')
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-state'),
|
||||
], [
|
||||
'key' => 'cart|country',
|
||||
'type' => 'select',
|
||||
'options' => $this->getCountries(),
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-country')
|
||||
'label' => trans('admin::app.promotions.cart-rules.shipping-country'),
|
||||
]
|
||||
]
|
||||
], [
|
||||
|
|
@ -265,19 +265,19 @@ class CartRuleRepository extends Repository
|
|||
[
|
||||
'key' => 'cart_item|base_price',
|
||||
'type' => 'price',
|
||||
'label' => trans('admin::app.promotions.cart-rules.price-in-cart')
|
||||
'label' => trans('admin::app.promotions.cart-rules.price-in-cart'),
|
||||
], [
|
||||
'key' => 'cart_item|quantity',
|
||||
'type' => 'integer',
|
||||
'label' => trans('admin::app.promotions.cart-rules.qty-in-cart')
|
||||
'label' => trans('admin::app.promotions.cart-rules.qty-in-cart'),
|
||||
], [
|
||||
'key' => 'cart_item|base_total_weight',
|
||||
'type' => 'decimal',
|
||||
'label' => trans('admin::app.promotions.cart-rules.total-weight')
|
||||
'label' => trans('admin::app.promotions.cart-rules.total-weight'),
|
||||
], [
|
||||
'key' => 'cart_item|base_total',
|
||||
'type' => 'price',
|
||||
'label' => trans('admin::app.promotions.cart-rules.subtotal')
|
||||
'label' => trans('admin::app.promotions.cart-rules.subtotal'),
|
||||
]
|
||||
]
|
||||
], [
|
||||
|
|
@ -288,22 +288,22 @@ class CartRuleRepository extends Repository
|
|||
'key' => 'product|category_ids',
|
||||
'type' => 'multiselect',
|
||||
'label' => trans('admin::app.promotions.cart-rules.categories'),
|
||||
'options' => $categories = $this->categoryRepository->getCategoryTree()
|
||||
'options' => $categories = $this->categoryRepository->getCategoryTree(),
|
||||
], [
|
||||
'key' => 'product|children::category_ids',
|
||||
'type' => 'multiselect',
|
||||
'label' => trans('admin::app.promotions.cart-rules.children-categories'),
|
||||
'options' => $categories
|
||||
'options' => $categories,
|
||||
], [
|
||||
'key' => 'product|parent::category_ids',
|
||||
'type' => 'multiselect',
|
||||
'label' => trans('admin::app.promotions.cart-rules.parent-categories'),
|
||||
'options' => $categories
|
||||
'options' => $categories,
|
||||
], [
|
||||
'key' => 'product|attribute_family_id',
|
||||
'type' => 'select',
|
||||
'label' => trans('admin::app.promotions.cart-rules.attribute_family'),
|
||||
'options' => $this->getAttributeFamilies()
|
||||
'options' => $this->getAttributeFamilies(),
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
@ -330,21 +330,21 @@ class CartRuleRepository extends Repository
|
|||
'key' => 'product|' . $attribute->code,
|
||||
'type' => $attribute->type,
|
||||
'label' => $attribute->name,
|
||||
'options' => $options
|
||||
'options' => $options,
|
||||
];
|
||||
|
||||
$attributes[2]['children'][] = [
|
||||
'key' => 'product|children::' . $attribute->code,
|
||||
'type' => $attribute->type,
|
||||
'label' => trans('admin::app.promotions.cart-rules.attribute-name-children-only', ['attribute_name' => $attribute->name]),
|
||||
'options' => $options
|
||||
'options' => $options,
|
||||
];
|
||||
|
||||
$attributes[2]['children'][] = [
|
||||
'key' => 'product|parent::' . $attribute->code,
|
||||
'type' => $attribute->type,
|
||||
'label' => trans('admin::app.promotions.cart-rules.attribute-name-parent-only', ['attribute_name' => $attribute->name]),
|
||||
'options' => $options
|
||||
'options' => $options,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ class CartRuleRepository extends Repository
|
|||
|
||||
$methods[] = [
|
||||
'id' => $object->getCode(),
|
||||
'admin_name' => $object->getTitle()
|
||||
'admin_name' => $object->getTitle(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ class CartRuleRepository extends Repository
|
|||
|
||||
$methods[] = [
|
||||
'id' => $object->getCode(),
|
||||
'admin_name' => $object->getTitle()
|
||||
'admin_name' => $object->getTitle(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ class CartRuleRepository extends Repository
|
|||
$collection[] = [
|
||||
'id' => $country->code,
|
||||
'admin_name' => $country->name,
|
||||
'states' => $countryStates
|
||||
'states' => $countryStates,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class CatalogRuleController extends Controller
|
|||
'starts_from' => 'nullable|date',
|
||||
'ends_till' => 'nullable|date|after_or_equal:starts_from',
|
||||
'action_type' => 'required',
|
||||
'discount_amount' => 'required|numeric'
|
||||
'discount_amount' => 'required|numeric',
|
||||
]);
|
||||
|
||||
$data = request()->all();
|
||||
|
|
@ -136,7 +136,7 @@ class CatalogRuleController extends Controller
|
|||
'starts_from' => 'nullable|date',
|
||||
'ends_till' => 'nullable|date|after_or_equal:starts_from',
|
||||
'action_type' => 'required',
|
||||
'discount_amount' => 'required|numeric'
|
||||
'discount_amount' => 'required|numeric',
|
||||
]);
|
||||
|
||||
$catalogRule = $this->catalogRuleRepository->findOrFail($id);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class CatalogRule extends Model implements CatalogRuleContract
|
|||
];
|
||||
|
||||
protected $casts = [
|
||||
'conditions' => 'array'
|
||||
'conditions' => 'array',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -148,12 +148,12 @@ class CatalogRuleRepository extends Repository
|
|||
'key' => 'product|category_ids',
|
||||
'type' => 'multiselect',
|
||||
'label' => trans('admin::app.promotions.catalog-rules.categories'),
|
||||
'options' => $this->categoryRepository->getCategoryTree()
|
||||
'options' => $this->categoryRepository->getCategoryTree(),
|
||||
], [
|
||||
'key' => 'product|attribute_family_id',
|
||||
'type' => 'select',
|
||||
'label' => trans('admin::app.promotions.catalog-rules.attribute_family'),
|
||||
'options' => $this->getAttributeFamilies()
|
||||
'options' => $this->getAttributeFamilies(),
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
@ -178,7 +178,7 @@ class CatalogRuleRepository extends Repository
|
|||
'key' => 'product|' . $attribute->code,
|
||||
'type' => $attribute->type,
|
||||
'label' => $attribute->name,
|
||||
'options' => $options
|
||||
'options' => $options,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class CategoryController extends Controller
|
|||
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug],
|
||||
'name' => 'required',
|
||||
'image.*' => 'mimes:jpeg,jpg,bmp,png',
|
||||
'description' => 'required_if:display_mode,==,description_only,products_and_description'
|
||||
'description' => 'required_if:display_mode,==,description_only,products_and_description',
|
||||
]);
|
||||
|
||||
if (strtolower(request()->input('name')) == 'root') {
|
||||
|
|
@ -146,7 +146,7 @@ class CategoryController extends Controller
|
|||
}
|
||||
}],
|
||||
$locale . '.name' => 'required',
|
||||
'image.*' => 'mimes:jpeg,jpg,bmp,png'
|
||||
'image.*' => 'mimes:jpeg,jpg,bmp,png',
|
||||
]);
|
||||
|
||||
$this->categoryRepository->update(request()->all(), $id);
|
||||
|
|
|
|||
|
|
@ -16,5 +16,13 @@ class CategoryTranslation extends Model implements CategoryTranslationContract
|
|||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['name', 'description', 'slug', 'meta_title', 'meta_description', 'meta_keywords', 'locale_id'];
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'description',
|
||||
'slug',
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'meta_keywords',
|
||||
'locale_id',
|
||||
];
|
||||
}
|
||||
|
|
@ -23,16 +23,6 @@ class CategoryServiceProvider extends ServiceProvider
|
|||
$this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register factories.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ class CategoryRepository extends Repository
|
|||
$trimmed[$key] = [
|
||||
'id' => $category->id,
|
||||
'name' => $category->name,
|
||||
'slug' => $category->slug
|
||||
'slug' => $category->slug,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class CustomerAddressForm extends FormRequest
|
|||
'billing.state' => ['required'],
|
||||
'billing.postcode' => ['required'],
|
||||
'billing.phone' => ['required'],
|
||||
'billing.country' => ['required']
|
||||
'billing.country' => ['required'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ class CustomerAddressForm extends FormRequest
|
|||
'shipping.state' => ['required'],
|
||||
'shipping.postcode' => ['required'],
|
||||
'shipping.phone' => ['required'],
|
||||
'shipping.country' => ['required']
|
||||
'shipping.country' => ['required'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,16 @@ class Cart extends Model implements CartContract
|
|||
{
|
||||
protected $table = 'cart';
|
||||
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
protected $guarded = [
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $with = ['items', 'items.children'];
|
||||
protected $with = [
|
||||
'items',
|
||||
'items.children',
|
||||
];
|
||||
|
||||
/**
|
||||
* To get relevant associated items with the cart instance
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class CartAddress extends Model implements CartAddressContract
|
|||
'phone',
|
||||
'address_type',
|
||||
'cart_id',
|
||||
];
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the shipping rates for the cart address.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,11 @@ class CartItem extends Model implements CartItemContract
|
|||
'additional' => 'array',
|
||||
];
|
||||
|
||||
protected $guarded = ['id', 'created_at', 'updated_at'];
|
||||
protected $guarded = [
|
||||
'id',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
public function product()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ class EventServiceProvider extends ServiceProvider
|
|||
* @var array
|
||||
*/
|
||||
protected $subscribe = [
|
||||
'Webkul\Checkout\Listeners\CustomerEventsHandler'
|
||||
'Webkul\Checkout\Listeners\CustomerEventsHandler',
|
||||
];
|
||||
}
|
||||
|
|
@ -21,6 +21,6 @@ return [
|
|||
\Webkul\User\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\CatalogRule\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\CartRule\Providers\ModuleServiceProvider::class,
|
||||
\Webkul\CMS\Providers\ModuleServiceProvider::class
|
||||
\Webkul\CMS\Providers\ModuleServiceProvider::class,
|
||||
]
|
||||
];
|
||||
|
|
@ -21,22 +21,22 @@ class ChannelTableSeeder extends Seeder
|
|||
'name' => 'Default',
|
||||
'default_locale_id' => 1,
|
||||
'base_currency_id' => 1,
|
||||
'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}'
|
||||
'home_seo' => '{"meta_title": "Demo store", "meta_keywords": "Demo store meta keyword", "meta_description": "Demo store meta description"}',
|
||||
]);
|
||||
|
||||
DB::table('channel_currencies')->insert([
|
||||
'channel_id' => 1,
|
||||
'currency_id' => 1
|
||||
'currency_id' => 1,
|
||||
]);
|
||||
|
||||
DB::table('channel_locales')->insert([
|
||||
'channel_id' => 1,
|
||||
'locale_id' => 1
|
||||
'locale_id' => 1,
|
||||
]);
|
||||
|
||||
DB::table('channel_inventory_sources')->insert([
|
||||
'channel_id' => 1,
|
||||
'inventory_source_id' => 1
|
||||
'inventory_source_id' => 1,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -16,12 +16,12 @@ class CurrencyTableSeeder extends Seeder
|
|||
DB::table('currencies')->insert([
|
||||
'id' => 1,
|
||||
'code' => 'USD',
|
||||
'name' => 'US Dollar'
|
||||
'name' => 'US Dollar',
|
||||
], [
|
||||
'id' => 2,
|
||||
'code' => 'EUR',
|
||||
'name' => 'Euro',
|
||||
'symbol' => '€'
|
||||
'symbol' => '€',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class CurrencyController extends Controller
|
|||
{
|
||||
$this->validate(request(), [
|
||||
'code' => 'required|min:3|max:3|unique:currencies,code',
|
||||
'name' => 'required'
|
||||
'name' => 'required',
|
||||
]);
|
||||
|
||||
Event::dispatch('core.currency.create.before');
|
||||
|
|
@ -106,7 +106,7 @@ class CurrencyController extends Controller
|
|||
{
|
||||
$this->validate(request(), [
|
||||
'code' => ['required', 'unique:currencies,code,' . $id, new \Webkul\Core\Contracts\Validations\Code],
|
||||
'name' => 'required'
|
||||
'name' => 'required',
|
||||
]);
|
||||
|
||||
Event::dispatch('core.currency.update.before', $id);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,11 @@ class Currency extends Model implements CurrencyContract
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['code', 'name', 'symbol'];
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'name',
|
||||
'symbol',
|
||||
];
|
||||
|
||||
/**
|
||||
* Set currency code in capital
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ class ModuleServiceProvider extends BaseModuleServiceProvider
|
|||
\Webkul\Core\Models\CurrencyExchangeRate::class,
|
||||
\Webkul\Core\Models\Locale::class,
|
||||
\Webkul\Core\Models\Slider::class,
|
||||
\Webkul\Core\Models\SubscribersList::class
|
||||
\Webkul\Core\Models\SubscribersList::class,
|
||||
];
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ class CoreConfigRepository extends Repository
|
|||
'code' => $fieldName,
|
||||
'value' => $value,
|
||||
'locale_code' => $localeBased ? $locale : null,
|
||||
'channel_code' => $channelBased ? $channel : null
|
||||
'channel_code' => $channelBased ? $channel : null,
|
||||
]);
|
||||
} else {
|
||||
foreach ($coreConfigValue as $coreConfig) {
|
||||
|
|
@ -101,7 +101,7 @@ class CoreConfigRepository extends Repository
|
|||
'code' => $fieldName,
|
||||
'value' => $value,
|
||||
'locale_code' => $localeBased ? $locale : null,
|
||||
'channel_code' => $channelBased ? $channel : null
|
||||
'channel_code' => $channelBased ? $channel : null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
return [
|
||||
'name' => 'Webkul Bagisto Core',
|
||||
'version' => '0.0.1'
|
||||
'version' => '0.0.1',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class CustomerGroupTableSeeder extends Seeder
|
|||
'id' => 1,
|
||||
'code' => 'guest',
|
||||
'name' => 'Guest',
|
||||
'is_user_defined' => 0
|
||||
'is_user_defined' => 0,
|
||||
], [
|
||||
'id' => 2,
|
||||
'code' => 'general',
|
||||
|
|
@ -26,7 +26,7 @@ class CustomerGroupTableSeeder extends Seeder
|
|||
'id' => 3,
|
||||
'code' => 'wholesale',
|
||||
'name' => 'Wholesale',
|
||||
'is_user_defined' => 0
|
||||
'is_user_defined' => 0,
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class Wishlist
|
|||
$wishlist = $this->wishlistRepository->findOneWhere([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'product_id' => $product->product_id,
|
||||
'customer_id' => auth()->guard('customer')->user()->id
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class ForgotPasswordController extends Controller
|
|||
{
|
||||
try {
|
||||
$this->validate(request(), [
|
||||
'email' => 'required|email'
|
||||
'email' => 'required|email',
|
||||
]);
|
||||
|
||||
$response = $this->broker()->sendResetLink(
|
||||
|
|
@ -67,9 +67,9 @@ class ForgotPasswordController extends Controller
|
|||
|
||||
return back()
|
||||
->withInput(request(['email']))
|
||||
->withErrors(
|
||||
['email' => trans($response)]
|
||||
);
|
||||
->withErrors([
|
||||
'email' => trans($response),
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
report($e);
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class ResetPasswordController extends Controller
|
|||
return back()
|
||||
->withInput(request(['email']))
|
||||
->withErrors([
|
||||
'email' => trans($response)
|
||||
'email' => trans($response),
|
||||
]);
|
||||
} catch(\Exception $e) {
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class SessionController extends Controller
|
|||
{
|
||||
$this->validate(request(), [
|
||||
'email' => 'required|email',
|
||||
'password' => 'required'
|
||||
'password' => 'required',
|
||||
]);
|
||||
|
||||
if (! auth()->guard('customer')->attempt(request(['email', 'password']))) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue