Baum\Extensions\Eloquent\Model::areSoftDeletesEnabled PHP Method

areSoftDeletesEnabled() public method

Returns wether soft delete functionality is enabled on the model or not.
public areSoftDeletesEnabled ( ) : boolean
return boolean
    public function areSoftDeletesEnabled()
    {
        // To determine if there's a global soft delete scope defined we must
        // first determine if there are any, to workaround a non-existent key error.
        $globalScopes = $this->getGlobalScopes();
        if (count($globalScopes) === 0) {
            return false;
        }
        // Now that we're sure that the calling class has some kind of global scope
        // we check for the SoftDeletingScope existance
        return static::hasGlobalScope(new SoftDeletingScope());
    }