protected function deleteModel(Model $model)
    {
        $strategy = $this->getModelInformation()->deleteStrategy();

        if ( ! $strategy) {
            return $model->delete();
        }

        /** @var DeleteStrategyFactoryInterface $factory */
        $factory = app(DeleteStrategyFactoryInterface::class);
        $strategy = $factory->make($strategy);

        return $strategy->delete($model);
    }
protected function deleteModel(Model $model)
    {
        $strategy = $this->getModelInformation()->deleteStrategy();

        if ( ! $strategy) {
            return $model->delete();
        }

        /** @var DeleteStrategyFactoryInterface $factory */
        $factory = app(DeleteStrategyFactoryInterface::class);
        $strategy = $factory->make($strategy);

        return $strategy->delete($model);
    }
protected function deleteModel ( Model $ model ) { $ strategy = $ this -> getModelInformation ( ) -> deleteStrategy ( ) ; if ( ! $ strategy ) { return $ model -> delete ( ) ; } /** @var DeleteStrategyFactoryInterface $factory */ $ factory = app ( DeleteStrategyFactoryInterface :: class ) ; $ strategy = $ factory -> make ( $ strategy ) ; return $ strategy -> delete ( $ model ) ; }
Deletes model.

Note that this does not check authorization, conditions, etc.

@param Model $model
@return bool
Deletes model .