blessing-skin-server/app/Providers/MemoryServiceProvider.php
2018-02-16 17:31:10 +08:00

24 lines
442 B
PHP

<?php
namespace App\Providers;
use Storage;
use League\Flysystem\Filesystem;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Memory\MemoryAdapter;
class MemoryServiceProvider extends ServiceProvider
{
public function boot()
{
Storage::extend('memory', function ($app, $config) {
return new Filesystem(new MemoryAdapter());
});
}
public function register()
{
//
}
}