blue32a / laravel-azure-blob-storage
使用 Azure Blob Storage 的 Laravel Filesystem。
1.0.0
2021-04-10 10:15 UTC
Requires
- php: ^7.2
- blue32a/flysystem-azure-blob-storage: ^1.0
- illuminate/support: ^6.0|^7.0
Requires (Dev)
- blue32a/php-coding-standard: v0.3.0-alpha
- mockery/mockery: ^1.3
- php-parallel-lint/php-parallel-lint: ^1.3
- phpunit/phpunit: ^8.5
README
关于
将 Azure Blob Storage 用作 Laravel 的文件存储。
Flysystem 适配器: blue32a/flysystem-azure-blob-storage
安装
$ composer require blue32a/laravel-azure-blob-storage
用法
在 config/filesystems.php
中配置您的磁盘。
驱动器为 azure-blob
。
'disks' => [ 'azure-blob' => [ 'driver' => 'azure-blob', 'secure' => true, 'name' => env('AZULE_STORAGE_NAME'), 'key' => env('AZULE_STORAGE_KEY'), 'container' => 'example', 'blob_endpoint' => env('AZULE_STORAGE_BLOB_ENDPOINT'), 'public_endpoint' => env('AZULE_STORAGE_PUBLIC_ENDPOINT'), ], ],
您可以使用 url()
。需要 Blob 的公开读取访问权限。
Storage::disk('azure-blob')->url($path);