Example #1
0
 /**
  * Get a default storage value, if any is available
  *
  * @return Filesystem|null A default storage value or Null if no default value is available
  */
 public function getDefaultStorage()
 {
     // By default, the Storage Facade does not return the
     // any actual storage fisk, but rather an
     // instance of \Illuminate\Filesystem\FilesystemManager.
     // Therefore, we make sure only to obtain its
     // "disk", to make sure that its the correct
     // instance that we obtain.
     $manager = Storage::getFacadeRoot();
     if (!is_null($manager)) {
         return $manager->disk();
     }
     return $manager;
 }
 /**
  * Get a default storage factory value, if any is available
  *
  * @return Factory|null A default storage factory value or Null if no default value is available
  */
 public function getDefaultStorageFactory()
 {
     return Storage::getFacadeRoot();
 }