oss-tools / laravel-ibm-cos
Laravel Custom Filesystem for IBM Cloud Object Storage
v2.1.1
2023-07-28 05:47 UTC
Requires
- php: ^8.0.2
- illuminate/filesystem: ^9.0 || ^10.0
- oss-tools/flysystem-ibm-cos: ^2.0.0
README
This is an IBM Cloud Object Storage Custom Filesystem for Laravel.
Note
This package is a detached fork of tavux/laravel-ibm-cos
Installation
- Install the package with Composer
composer require oss-tools/laravel-ibm-cos
-
Add
\OSSTools\IBMCloudObjectStorage\Laravel\IbmCloudObjectStorageProvider::class
toproviders
in config/app.php -
In your .env file, add these lines with your IBM Cloud storage parameters
IBM_COS_ACCESS_KEY_ID=<access_key> IBM_COS_SECRET_ACCESS_KEY=<secret_access_key> IBM_COS_DEFAULT_REGION=<region> IBM_COS_BUCKET=<bucket> IBM_COS_ENDPOINT=<endpoint>
Usage
This is an example of usage :
use Illuminate\Support\Facades\Storage; Storage::disk('ibm-cos')->allFiles('/');
To know all the available methods, please have a look to the Laravel File Storage documentation.