src/Processor/IndexProcessor.php
public function changeStatus(IndexListener $listener, $id)
    {
        $model = $this->repository->find($id);
        if (is_null($model)) {
            return $listener->changeStatusFailed();
        }
        $model->active = $model->active ? 0 : 1;
        $model->save();
        return $listener->changeStatusSuccess();
    }
public function changeStatus(IndexListener $listener, $id)
    {
        $model = $this->repository->find($id);
        if (is_null($model)) {
            return $listener->changeStatusFailed();
        }
        $model->active = $model->active ? 0 : 1;
        $model->save();
        return $listener->changeStatusSuccess();
    }
public function changeStatus ( IndexListener $ listener , $ id ) { $ model = $ this -> repository -> find ( $ id ) ; if ( is_null ( $ model ) ) { return $ listener -> changeStatusFailed ( ) ; } $ model -> active = $ model -> active ? 0 : 1 ; $ model -> save ( ) ; return $ listener -> changeStatusSuccess ( ) ; }
change notification notification status

@param IndexListener $listener
@param mixed $id
@return RedirectResponse
change notification notification status