slider delete issue

This commit is contained in:
rahul shukla 2019-07-08 17:10:42 +05:30
parent 6fec08f814
commit f9e9dfbae1
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class SliderController extends Controller
{
$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'));
} else {
try {