Skip to content

larvatecn/laravel-flysystem-qiniu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-flysystem-qiniu

This is a Flysystem adapter for the Qiniu

PHP Composer

Installation

composer require larva/laravel-flysystem-qiniu -vv

for Laravel

This service provider must be registered.

// config/app.php

'providers' => [
    '...',
    Larva\Flysystem\Qiniu\QiniuServiceProvider::class,
];

edit the config file: config/filesystems.php

add config

'qiniu' => [
    'driver'     => 'qiniu',
    'access_key' => env('QINIU_ACCESS_KEY'),
    'secret_key' => env('QINIU_SECRET_KEY'),
    'bucket' => env('QINIU_BUCKET'),
    'prefix' => env('QINIU_PREFIX'), // optional
    'url' => env('QINIU_BUCKET_URL'),
    'visibility' => 'private',
],

change default to oss

    'default' => 'qiniu'

Use

see Laravel wiki