mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Extend the facade class
Fixes Issue #1 Only extended when it is not the same as the root class (because of overriding static methods)
This commit is contained in:
@@ -138,8 +138,13 @@ class GeneratorCommand extends Command {
|
||||
$output .= "namespace $namespace {\n";
|
||||
if($sublime){
|
||||
$output .= " class $alias extends \\$root{\n";
|
||||
}else{
|
||||
//If the root class is not the same as the facade extend it.
|
||||
if($root !== $facade){
|
||||
$output .= " class $alias extends $facade{\n";
|
||||
}else{
|
||||
$output .= " class $alias{\n";
|
||||
}
|
||||
$output .= "\t/**\n\t * @var \\$root \$root\n\t */\n\t static private \$root;\n\n";
|
||||
}
|
||||
$methods = $d->getMethods();
|
||||
|
||||
Reference in New Issue
Block a user