Merge pull request #6257 from turbo124/v5-develop
Minor fixes for product and client bulk actions
This commit is contained in:
commit
474e7c1075
2 changed files with 2 additions and 2 deletions
|
|
@ -510,7 +510,7 @@ class ClientController extends BaseController
|
|||
$action = request()->input('action');
|
||||
|
||||
$ids = request()->input('ids');
|
||||
$clients = Client::withTrashed()->find($this->transformKeys($ids));
|
||||
$clients = Client::withTrashed()->whereIn('id', $this->transformKeys($ids))->cursor();
|
||||
|
||||
$clients->each(function ($client, $key) use ($action) {
|
||||
if (auth()->user()->can('edit', $client)) {
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ class ProductController extends BaseController
|
|||
|
||||
$ids = request()->input('ids');
|
||||
|
||||
$products = Product::withTrashed()->find($this->transformKeys($ids));
|
||||
$products = Product::withTrashed()->whereIn('id', $this->transformKeys($ids))->cursor();
|
||||
|
||||
$products->each(function ($product, $key) use ($action) {
|
||||
if (auth()->user()->can('edit', $product)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue