2017 © Pedro PelĂĄez
 

library laravel-vfs-provider

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

image

mmieluch/laravel-vfs-provider

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  • Thursday, February 2, 2017
  • by mmieluch
  • Repository
  • 1 Watchers
  • 3 Stars
  • 7,775 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 6 Versions
  • 16 % Grown

The README.md

laravel-vfs-provider

Latest Stable Version Total Downloads License, (*1)

A service provider intended to use with Laravel 5.x for The League Flysystem's wrapper around PHP-VFS library., (*2)

Installation

  1. Update your project dependencies:, (*3)

    composer require mmieluch/laravel-vfs-provider
    
  2. Register new service provider in config/app.php:, (*4)

    return [
    
      'providers' => [
    
          ...
    
          /*
           * 3rd Party Service Providers
           */
          Mmieluch\LaravelVfsProvider\LaravelVfsServiceProvider::class,
    
      ],
    
    ];
    
  3. Update your config/filesystems.php file:, (*5)

    return [
    
      ...
    
      'disks' => [
    
        // This is just an example name, you can call your disk
        // however you want :)
        'virtual' => [
            'driver' => 'vfs',
        ],
    
      ],
    
    ];
    

Now you can start using your new driver, just as you'd use a local driver:, (*6)


// Get a handler for storage... $storage = app('storage'); // Or, if your VFS disk is not a default one, you need to // choose it from the pool of available disks. $storage = app('storage')->disk('virtual'); // And you're ready to use your new virtual filesystem! $storage->makeDirectory('foo'); $storage->put('foo/bar.txt', 'baz'); $storage->has('foo/bar.txt'); // Returns: true echo $storage->get('/foo/bar.txt'); // Outputs: baz // You'd like to use a facade? Why, go ahead! Storage::put('test.txt', 'All about that bass'); // Again, if your virtual drive is not set as your default: Storage::disk('virtual')->put('test.txt', 'No treble');

For full set of instructions on how to use the Laravel filesystem service visit Laravel's official documentation, (*7)

TODO

  • set up path prefix (configuration root), like in other drivers;
  • add tests.

Bugs? Suggestions?

Feel free to file an issue or submit a PR., (*8)

License

This package is open-sourced software licensed under the MIT license., (*9)

The Versions

02/02 2017

dev-master

9999999-dev

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  Sources   Download

MIT

The Requires

 

by MichaƂ Mieluch

laravel php flysystem service provider vfs php-vfs

02/02 2017

1.0.1

1.0.1.0

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  Sources   Download

MIT

The Requires

 

by MichaƂ Mieluch

laravel php flysystem service provider vfs php-vfs

02/02 2017

1.0.0

1.0.0.0

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  Sources   Download

MIT

The Requires

 

by MichaƂ Mieluch

laravel php flysystem service provider vfs php-vfs

02/09 2016

0.0.3

0.0.3.0

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  Sources   Download

MIT

The Requires

 

by MichaƂ Mieluch

laravel php flysystem service provider vfs php-vfs

16/02 2016

0.0.2

0.0.2.0

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  Sources   Download

MIT

The Requires

 

by MichaƂ Mieluch

laravel php flysystem service provider vfs php-vfs

16/02 2016

0.0.1

0.0.1.0

A Laravel service provider for Flysystem's wrapper around PHP-VFS.

  Sources   Download

MIT

The Requires

 

by MichaƂ Mieluch

laravel php flysystem service provider vfs php-vfs