joshstar / laravel-backblaze

Backblaze B2 Cloud Storage for Laravel 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backblaze B2 Cloud Storage for Laravel 5

Latest Version on Packagist Total Downloads

Backblaze B2 is a great cloud storage system that compares to Amazon S3, but uses lower pricing, so worth the try. ;-) Since I couldn't find a serviceprovider to implement B2 into the Laravel Filesystem, I wrote one myself. Feel free to use it.

Installation

Via Composer

composer require hpolthof/laravel-backblaze

In your app.php config file add to the list of service providers:

\Hpolthof\Backblaze\BackblazeServiceProvider::class,

Add the following to your filesystems.php config file in the disks section:

'b2' => [
    'driver'         => 'b2',
    'accountId'      => '',
    'applicationKey' => '',
    'bucketName'     => '',
],

Now just paste in your credentials and bucketname and you're ready to go!

Usage

Just use it as you normally would use the Storage facade.

\Storage::disk('b2')->put('test.txt', 'test')

and

\Storage::disk('b2')->get('test.txt')

Credits

License

MIT

About

Backblaze B2 Cloud Storage for Laravel 5


Languages

Language:PHP 100.0%