Syncing Of Method With Routes
This commit is contained in:
parent
27e26d7d35
commit
0283c56df1
|
|
@ -98,7 +98,7 @@ class AddressDataGrid extends DataGrid
|
|||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'city',
|
||||
'label' => trans('admin::app.customers.addresses.city'),
|
||||
|
|
@ -167,7 +167,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' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class AttributeDataGrid extends DataGrid
|
|||
'action' => route('admin.catalog.attributes.massdelete'),
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'index' => 'admin_name',
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class CMSPageDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'action' => route('admin.cms.mass-delete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ class CartRuleCouponDataGrid extends DataGrid
|
|||
protected $sortOrder = 'desc';
|
||||
|
||||
public function prepareQueryBuilder()
|
||||
{
|
||||
{
|
||||
$route = request()->route() ? request()->route()->getName() : "" ;
|
||||
|
||||
$cartRuleId = $route == 'admin.cart-rules.edit' ? collect(request()->segments())->last() : last(explode("/", url()->previous()));
|
||||
|
|
@ -20,7 +20,7 @@ class CartRuleCouponDataGrid extends DataGrid
|
|||
$queryBuilder = DB::table('cart_rule_coupons')
|
||||
->addSelect('id', 'code', 'created_at', 'expired_at', 'times_used')
|
||||
->where('cart_rule_coupons.cart_rule_id', $cartRuleId);
|
||||
|
||||
|
||||
$this->setQueryBuilder($queryBuilder);
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ class CartRuleCouponDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'action' => route('admin.cart-rule-coupons.mass-delete'),
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ class CategoryDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'action' => route('admin.catalog.categories.massdelete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -160,14 +160,14 @@ class CustomerDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'action' => route('admin.customer.mass-delete'),
|
||||
'method' => 'PUT',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
|
||||
$this->addMassAction([
|
||||
'type' => 'update',
|
||||
'label' => trans('admin::app.datagrid.update-status'),
|
||||
'action' => route('admin.customer.mass-update'),
|
||||
'method' => 'PUT',
|
||||
'method' => 'POST',
|
||||
'options' => [
|
||||
'Active' => 1,
|
||||
'Inactive' => 0,
|
||||
|
|
|
|||
|
|
@ -108,14 +108,14 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'action' => route('admin.customer.review.massdelete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
|
||||
$this->addMassAction([
|
||||
'type' => 'update',
|
||||
'label' => trans('admin::app.datagrid.update-status'),
|
||||
'action' => route('admin.customer.review.massupdate'),
|
||||
'method' => 'PUT',
|
||||
'method' => 'POST',
|
||||
'options' => [
|
||||
trans('admin::app.customers.reviews.pending') => 0,
|
||||
trans('admin::app.customers.reviews.approved') => 1,
|
||||
|
|
|
|||
|
|
@ -223,14 +223,14 @@ class ProductDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'action' => route('admin.catalog.products.massdelete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
|
||||
$this->addMassAction([
|
||||
'type' => 'update',
|
||||
'label' => trans('admin::app.datagrid.update-status'),
|
||||
'action' => route('admin.catalog.products.massupdate'),
|
||||
'method' => 'PUT',
|
||||
'method' => 'POST',
|
||||
'options' => [
|
||||
'Active' => 1,
|
||||
'Inactive' => 0,
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class CategoryDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'action' => route('velocity.admin.category.mass-delete'),
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class ContentDataGrid extends DataGrid
|
|||
'type' => 'delete',
|
||||
'action' => route('velocity.admin.content.mass-delete'),
|
||||
'label' => trans('admin::app.datagrid.delete'),
|
||||
'method' => 'DELETE',
|
||||
'method' => 'POST',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue