Improve trait check

Fixes #83
This commit is contained in:
Barry vd. Heuvel
2014-06-29 13:34:52 +02:00
parent 0b70167182
commit 645926fd37
@@ -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, '\\');