mmieluch/laravel-vfs-provider 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mmieluch/laravel-vfs-provider

Composer 安装命令:

composer require mmieluch/laravel-vfs-provider

包简介

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

README 文档

README

Latest Stable Version Total Downloads License

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

Installation

  1. Update your project dependencies:

    composer require mmieluch/laravel-vfs-provider
  2. Register new service provider in config/app.php:

return [

    'providers' => [

        ...

        /*
         * 3rd Party Service Providers
         */
        Mmieluch\LaravelVfsProvider\LaravelVfsServiceProvider::class,

    ],

];
  1. Update your config/filesystems.php file:
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:

// 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

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.

License

This package is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 18.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固