PHP code example of baleen / storage-flysystem

1. Go to this page and download the library: Download baleen/storage-flysystem library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

baleen / storage-flysystem example snippets


use League\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;

$adapter = new Local(__DIR__.'/path/to/root');
$filesystem = new Filesystem($adapter);

$storage = new FlyStorage($filesystem); // default filename is ".baleen_versions"

// and then, for example:
$migratedVersions = $storage->fetchAll();

// another example (save a new migrated version):
$v = new \Baleen\Migrations\Version('newVersion', true);
$storage->save($v);