Skip to content

A Statamic addon which provides a Flysystem Adapter for the Pixxio API

Notifications You must be signed in to change notification settings

visuellverstehen/statamic-pixxio-flysystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statamic Pixxio Flysystem

Statamic 3.4+

Statamic Pixxio Flysystem is a Statamic addon that does something pretty neat.

Features

  • Provide a Flysystem Adapter for Pixxio
  • Exclude specific directories from the asset-container.

Licensing

Pixxio Flysystem is a commercial addon - you must purchase a license via the Statamic Marketplace to use it in a production environment.


How to Install

Run the following command from your project root:

composer require visuellverstehen/statamic-pixxio-flysystem

Add your Pixxio credentials to config/filesystems.php

'disks' => [
    'pixxio' => [
        'driver' => 'pixxio',
        'api_key' => env('PIXXIO_API_KEY'),
        'refresh_token' => env('PIXXIO_REFRESH_TOKEN'),
        'endpoint' => env('PIXXIO_ENDPOINT'),
    ],
],

Run migrations

php artisan migrate

Edit blueprint

Add alt, copyright and description fields to the asset-container blueprint.

Run synchronization script:

php artisan pixxio:sync

If you wish to only import newly added files you can use the --new option.

php artisan pixxio:sync --new

In order to keep the database updated schedule a task that runs synchronization script regularly.


Configurations

php artisan vendor:publish --provider="VV\PixxioFlysystem\ServiceProvider" --tag="flysystem-pixxio-config"

Exclude certain directories in config/flysystem-pixxio.php

'exclude' => [
        'directories' => [
            '/home',
        ],
    ],

How to Use

  • Simply create an Asset-Container with pixxio as your driver.