From 645926fd373e978dbee3a7262225b5dd97265693 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Sun, 29 Jun 2014 13:34:52 +0200 Subject: [PATCH] Improve trait check Fixes #83 --- src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index 2340847..e1e1d55 100755 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -138,8 +138,8 @@ class GeneratorCommand extends Command { $aliases = $aliasLoader->getAliases(); foreach($aliases as $alias => $facade){ - //Check if the facade is not a Trait (could need a better check..) - if(\Str::contains($facade, 'Trait')){ + //Check if the facade is not a Trait + if(function_exists('trait_exists') && trait_exists($facade)){ continue; } $facade = '\\'.ltrim($facade, '\\');