diff --git a/src/Veil.php b/src/Veil.php index c2183b1..fb6452b 100644 --- a/src/Veil.php +++ b/src/Veil.php @@ -125,6 +125,10 @@ public function add($veils, $class = null): Veil if (interface_exists($veil)) { $this->registered[$veil] = $this->veils[$veil]; } + + if (trait_exists($veil)) { + $this->registered[$veil] = $this->veils[$veil]; + } } } @@ -138,6 +142,10 @@ public function add($veils, $class = null): Veil if (interface_exists($veils)) { $this->registered[$veils] = $this->veils[$veils]; } + + if (trait_exists($veils)) { + $this->registered[$veils] = $this->veils[$veils]; + } } return $this;