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()
|
|
|
|
{
|
2018-02-16 17:31:04 +08:00
|
|
|
Storage::extend('memory', function ($app, $config) {
|
2017-11-17 14:00:29 +08:00
|
|
|
return new Filesystem(new MemoryAdapter());
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|