GitHub - WebGardenGroup/flysystem-doctrine: Flysystem Doctrine Adapter · GitHub
Skip to content

About

Flysystem Doctrine Adapter

Resources

Stars

2 stars

Watchers

3 watching

Forks

Repository files navigation

WGG\Flysystem\Doctrine

GitHub Workflow Status Packagist PHP Version Support Packagist Version

This is a Flysystem adapter for Doctrine DBAL.

Installation

composer require wgg/flysystem-doctrine

Bootstrap

<?php
use Doctrine\DBAL\DriverManager;
use League\Flysystem\Filesystem;
use WGG\Flysystem\Doctrine\DoctrineDBALAdapter;

$connectionParams = [
    'url' => 'mysql://user:secret@localhost/mydb',
];
$connection = DriverManager::getConnection($connectionParams);

$adapter = new DoctrineDBALAdapter($connection, 'flysystem_files');
$filesystem = new Filesystem($adapter);

Database

At the beginning you have to create a table that will be used to store files. SQL table schema can be found in the schema folder

About

Flysystem Doctrine Adapter

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages