From 9a079e236d6f486cb60552e7fa6f21e81dae66b9 Mon Sep 17 00:00:00 2001 From: Barry Date: Sun, 24 Mar 2013 15:59:41 +0100 Subject: [PATCH] Check if class/interface exists Display error, but continue if not. --- src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index 7a71b0f..5013c14 100644 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -104,6 +104,10 @@ class GeneratorCommand extends Command { }else{ $root = $facade; } + if(!class_exists($root) && !interface_exists($root)){ + $this->error("Class $root is not found."); + continue; + } if(strpos($alias, '\\') !== false){ $parts = explode('\\', $alias);