academe/laravel-azure-file-storage-driver
Composer 安装命令:
composer require academe/laravel-azure-file-storage-driver
包简介
Azure File Storage filesystem driver for Laravel
README 文档
README
Microsoft Azure File Storage Filesystem Driver for Laravel 6, 7 and 9
This package allows Microsoft Azure File Storage to be used as a filesystem in laravel 5 and 6.
Installation
composer require academe/laravel-azure-file-storage-driver
This package just extends the filesystem driver, and provides no additional services.
Configuration
Add the following to your config/filesystems.php:
[
...
'disks' => [
...
// Name this disk for your application to reference.
'azure-file-storage' => [
// The driver provided by this package.
'driver' => 'azure-file-storage',
// Account credentials.
'storageAccount' => env('AZURE_FILE_STORAGE_ACCOUNT'),
'storageAccessKey' => env('AZURE_FILE_STORAGE_ACCESS_KEY'),
// The file share.
// This driver supports one file share at a time (you cannot
// copy or move files between shares natively).
'fileShareName' => env('AZURE_FILE_STORAGE_SHARE_NAME'),
// Optional settings
'disableRecursiveDelete' => false,
'driverOptions' => [],
'root' => 'root/directory', // Without leading '/'
],
],
];
If you want to use multiple Azure file storage shares, then create additional
entries in the disks array with the appropriate settings for each share.
An example list of environment variable entries can be found in .env.example.
You can add that to your .env file and add your credentials there.
Usage
See the Laravel documentation for general usage of a file system in Laravel. A simple example follows:
use Storage;
// List all files recursively from the root of the Azure share:
$files = Storage::disk('azure-file-storage')->listAll();
dump($files);
// Example:
// array:25 [▼
// 0 => "file1.txt"
// 1 => "foo/file2.txt"
// 2 => "foo/dee/dar/bigfile.txt"
// ]
Testing
PHPunit tests will work against any file storage share given
criteria set in .env based on .env.example.
academe/laravel-azure-file-storage-driver 适用场景与选型建议
academe/laravel-azure-file-storage-driver 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 143.16k 次下载、GitHub Stars 达 15, 最近一次更新时间为 2018 年 02 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「azure」 「driver」 「laravel」 「file storage」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 academe/laravel-azure-file-storage-driver 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 academe/laravel-azure-file-storage-driver 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 academe/laravel-azure-file-storage-driver 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Small library to access Microsoft Windows Azure Blob Storage with a Service or a StreamWrapper.
Galera cluster driver for Doctrine
Adds Silverstripe Flysystem support for using the Azure Blob adapter
A PHP client driver for the RethinkDB query language (ReQL)
Laravel 5 Queue Driver for Microsoft Azure Storage Queue
Laravel Azure storage service provider
统计信息
- 总下载量: 143.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-25