From 606183ea12785011ebedb3b501cb2f953f885a6c Mon Sep 17 00:00:00 2001 From: Vedmant Date: Thu, 3 Mar 2016 16:33:28 +0200 Subject: [PATCH] Added support for default storage driver shortcuts, eg. Storage::exists('file.jpg'); --- src/Generator.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Generator.php b/src/Generator.php index 197debf..8fedc23 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -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) {} + } /**