Skip to content

Commit

Permalink
Merge pull request #533 from jitendra-webkul/master
Browse files Browse the repository at this point in the history
Issue #530 fixed
  • Loading branch information
jitendra-webkul committed Oct 19, 2021
2 parents 16e9fd1 + ae3c62d commit f9ca6dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/Webkul/Admin/src/Config/acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
], [
'key' => 'settings.other_settings.tags.delete',
'name' => 'admin::app.acl.delete',
'route' => 'admin.settings.tags.delete',
'route' => ['admin.settings.tags.delete', 'admin.settings.tags.mass_delete'],
'sort' => 2,
], [
'key' => 'configuration',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,17 @@ public function search()
*/
public function massDestroy()
{
$data = request()->all();
foreach (request('rows') as $tagId) {
Event::dispatch('settings.tag.delete.before', $tagId);

$this->tagRepository
->whereIn('id', $data['rows'])
->delete();
$this->tagRepository->delete($tagId);

Event::dispatch('settings.tag.delete.after', $tagId);
}

return response()->json([
'status' => true,
'message' => trans('admin::app.response.destroy-success', ['name' => trans('admin::app.settings.tags.title')]),
'status' => true,
'message' => trans('admin::app.response.destroy-success', ['name' => trans('admin::app.settings.tags.title')]),
]);
}
}

0 comments on commit f9ca6dd

Please sign in to comment.