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());
}