xiaomlove/laravel-filesystem-cloudinary

为 Laravel 定制的 Cloudinary 文件系统

v0.1.0 2019-04-20 19:40 UTC

This package is auto-updated.

Last update: 2024-09-22 03:36:22 UTC


README

基于 carlosocarvalho/flysystem-cloudinary

配置

...

'cloudinary' => [
    'driver' => 'cloudinary',
    'api_key' => env('CLOUDINARY_API_KEY'),
    'api_secret' => env('CLOUDINARY_API_SECRET'),
    'cloud_name' => env('CLOUDINARY_CLOUD_NAME'),
],

...

用法

use Storage

// get fle url
Storage::url($path)

// get file url with options, options referance to: https://github.com/cloudinary/cloudinary_php#usage
Storage::getUrl($path, $options)