36 lines
621 B
PHP
36 lines
621 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Storage;
|
|
use League\Flysystem\Filesystem;
|
|
use League\Flysystem\Sftp\SftpAdapter;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
|
|
Storage::extend('sftp', function ($app, $config) {
|
|
return new Filesystem(new SftpAdapter($config));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
}
|