PHP code example of royvoetman / flysystem-gitlab-storage

1. Go to this page and download the library: Download royvoetman/flysystem-gitlab-storage 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/ */

    

royvoetman / flysystem-gitlab-storage example snippets


// Create a Gitlab Client to talk with the API
$client = new Client('project-id', 'branch', 'base-url', 'personal-access-token');
   
// Create the Adapter that implements Flysystems AdapterInterface
$adapter = new GitlabAdapter(
    // Gitlab API Client
    $client,
    // Optional path prefix
    'path/prefix',
);

// The FilesystemOperator
$filesystem = new League\Flysystem\Filesystem($adapter);

// see http://flysystem.thephpleague.com/api/ for full list of available functionality