Added support for default storage driver shortcuts, eg. Storage::exists('file.jpg');

This commit is contained in:
Vedmant
2016-03-03 16:33:28 +02:00
parent f1ebd847aa
commit 606183ea12
+8
View File
@@ -164,6 +164,14 @@ class Generator
}
}catch (\Exception $e) {}
try{
if (class_exists('Storage') && is_a('Storage', '\Illuminate\Support\Facades\Storage', true)){
$class = get_class(\Storage::disk());
$this->extra['Storage'] = array($class);
$this->interfaces['\Illuminate\Contracts\Filesystem\Filesystem'] = $class;
}
}catch (\Exception $e) {}
}
/**