diff --git a/src/Auditable.php b/src/Auditable.php index c7cebd36..3e8d0f55 100644 --- a/src/Auditable.php +++ b/src/Auditable.php @@ -71,22 +71,7 @@ trait Auditable */ public static function bootAuditable() { - try { - $isAuditingEnabled = static::isAuditingEnabled(); - } catch (\RuntimeException $e) { - if ($e->getMessage() !== 'A facade root has not been set.') { - throw $e; - } - - /** - * Facade root has not been set. The user may be attempting to use - * their Auditable outside of the application context. We will - * just skip booting for now. - */ - return; - } - - if ($isAuditingEnabled) { + if (App::getFacadeRoot() && static::isAuditingEnabled()) { static::observe(new AuditableObserver()); } }