29.07.2016 Views

laravel-5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Filesystem / Cloud Storage 262<br />

.<br />

1 Storage::makeDirectory($directory);<br />

Delete A Directory<br />

Finally, the deleteDirectory may be used to remove a directory, including all of its files, from the<br />

disk:<br />

.<br />

1 Storage::deleteDirectory($directory);<br />

Custom Filesystems<br />

Laravel’s Flysystem integration provides drivers for several “drivers” out of the box; however,<br />

Flysystem is not limited to these and has adapters for many other storage systems. You can create a<br />

custom driver if you want to use one of these additional adapters in your Laravel application.<br />

In order to set up the custom filesystem you will need to create a service provider such as<br />

DropboxServiceProvider. In the provider’s boot method, you may use the Storage facade’s extend<br />

method to define the custom driver:<br />

.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!