manual item upload

This commit is contained in:
Frank John Begornia
2019-05-17 15:55:38 +08:00
parent c39fb0a2a4
commit 30962d3b4e
26 changed files with 960 additions and 98 deletions

View File

@@ -1,6 +1,9 @@
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Storage;
use League\Flysystem\Filesystem;
use League\Flysystem\Sftp\SftpAdapter;
class AppServiceProvider extends ServiceProvider {
@@ -15,6 +18,10 @@ class AppServiceProvider extends ServiceProvider {
\Blade::extend(function($value) {
return preg_replace('/\@define(.+)/', '<?php ${1}; ?>', $value);
});
Storage::extend('sftp', function ($app, $config) {
return new Filesystem(new SftpAdapter($config));
});
}
/**