blessing-skin-server/app/Providers/MemoryServiceProvider.php

24 lines
441 B
PHP
Raw Normal View History

2017-11-17 14:00:29 +08:00
<?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()
{
//
}
}