Merge pull request #1164 from rahulshukla-webkul/development

slider delete issue
This commit is contained in:
Jitendra Singh 2019-07-08 17:12:42 +05:30 committed by GitHub
commit 9d23e931ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class SliderController extends Controller
{ {
$slider = $this->slider->findOrFail($id); $slider = $this->slider->findOrFail($id);
if ($this->slider->findWhere(['channel_id' => core()->getCurrentChannel()->id])->count() == 1) { if ($this->slider->findWhere(['channel_id' => core()->getCurrentChannel()->id])->count() == 1 && ($slider->channel_id == core()->getCurrentChannel()->id)) {
session()->flash('warning', trans('admin::app.settings.sliders.delete-success')); session()->flash('warning', trans('admin::app.settings.sliders.delete-success'));
} else { } else {
try { try {