aedart/athenaeum-flysystem-db
最新稳定版本:9.20.0
Composer 安装命令:
composer require aedart/athenaeum-flysystem-db
包简介
Flysystem Database Adapter
README 文档
README
A Flysystem adapter that store files and directories in your database.
Supported Databases
Behind the scene, Laravel's Database package is used to execute queries, which grants support for the following databases:
- MariaDB
- MySQL
- PostgreSQL
- SQLite
- SQL Server
use Aedart\Flysystem\Db\Adapters\DatabaseAdapter; use Illuminate\Database\Capsule\Manager as Capsule; use League\Flysystem\Filesystem; // Establish database connection $capsule = new Capsule; $capsule->addConnection([ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'database', 'username' => 'root', 'password' => 'password', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ]); $connection = $capsule->getConnection(); // Create Database Adapter instance $adapter = new DatabaseAdapter( filesTable: 'files', contentsTable: 'files_contents', connection: $connection ); // Finally, create filesystem instance $filesystem = new Filesystem($adapter);
Note: If you wish to use this adapter within your Laravel Application, then you can choose register this package's Service Provider. See official documentation for more information.
Data Deduplication
The adapter makes use of Data Deduplication technique, which means that files that have the exact same content are only stored once.
Documentation
Please read the official documentation for additional information.
Repository
The mono repository is located at github.com/aedart/athenaeum
Versioning
This package follows Semantic Versioning 2.0.0
License
BSD-3-Clause, Read the LICENSE file included in this package
统计信息
- 总下载量: 22.61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-05-11