2017 © Pedro Peláez
 

library laravel-filesystem-qiniu

A Qiniu storage filesystem for Laravel.

image

lyle-lai/laravel-filesystem-qiniu

A Qiniu storage filesystem for Laravel.

  • Friday, July 28, 2017
  • by LyleLai
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Laravel filesystem Qiniu

Qiniu storage for Laravel based on overtrue/flysystem-qiniu., (*1)

Requirement

  • PHP >= 5.5.9

Installation

$ composer require "overtrue/laravel-filesystem-qiniu" -vvv

Configuration

  1. After installing the library, register the Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider in your config/app.php file:, (*2)

    'providers' => [
      // Other service providers...
      Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider::class,
    ],
    
  2. Add a new disk to your config/filesystems.php config:, (*3)

    <?php
    
    return [
     //...
     'qiniu' => [
        'driver'     => 'qiniu',
        'access_key' => env('QINIU_ACCESS_KEY', 'xxxxxxxxxxxxxxxx'),
        'secret_key' => env('QINIU_SECRET_KEY', 'xxxxxxxxxxxxxxxx'),
        'bucket'     => env('QINIU_BUCKET', 'test'),
        'domain'     => env('QINIU_DOMAIN', 'xxx.clouddn.com'), // or host: https://xxxx.clouddn.com
     ],
     //...
    ];
    

Usage

$disk = Storage::disk('qiniu');

// create a file
$disk->put('avatars/1', $fileContents);

// check if a file exists
$exists = $disk->has('file.jpg');

// get timestamp
$time = $disk->lastModified('file1.jpg');
$time = $disk->getTimestamp('file1.jpg');

// copy a file
$disk->copy('old/file1.jpg', 'new/file1.jpg');

// move a file
$disk->move('old/file1.jpg', 'new/file1.jpg');

// get file contents
$contents = $disk->read('folder/my_file.txt');

Full API documentation., (*4)

License

MIT, (*5)

The Versions

28/07 2017

dev-master

9999999-dev

A Qiniu storage filesystem for Laravel.

  Sources   Download

MIT

The Requires

 

by Avatar overtrue

28/07 2017

0.0.4

0.0.4.0

A Qiniu storage filesystem for Laravel.

  Sources   Download

MIT

The Requires

 

by Avatar overtrue

03/07 2017

0.0.3

0.0.3.0

A Qiniu storage filesystem for Laravel.

  Sources   Download

MIT

The Requires

 

by Avatar overtrue

02/04 2017

0.0.2

0.0.2.0

A Qiniu storage filesystem for Laravel.

  Sources   Download

MIT

The Requires

 

by Avatar overtrue

14/03 2017

0.0.1

0.0.1.0

A Qiniu storage filesystem for Laravel.

  Sources   Download

MIT

The Requires

 

by Avatar overtrue