League\FactoryMuffin\Stores\ModelStore::delete PHP Method

delete() protected method

Delete our object from the db.
protected delete ( object $model ) : mixed
$model object The model instance.
return mixed
    protected function delete($model)
    {
        $method = $this->methods['delete'];
        if (!method_exists($model, $method) || !is_callable([$model, $method])) {
            throw new DeleteMethodNotFoundException(get_class($model), $method);
        }
        return $model->{$method}();
    }