/** * Bootstrap the application services. * * @return void */ public function boot() { Storage::extend('bos', function ($app, $config) { $client = new BosClient($config); return new Filesystem(new BosAdapter($client, $config)); }); }
public function boot() { Storage::extend('dropbox', function ($app, $config) { $client = new DropboxClient($config['accessToken'], $config['appSecret']); return new Filesystem(new DropboxAdapter($client)); }); }
/** * Perform post-registration booting of services. * * @return void */ public function boot() { Storage::extend('cloudinary', function ($app, $config) { $client = new CloudinaryClient(['cloud_name' => $config['name'], 'api_key' => $config['key'], 'api_secret' => $config['secret']]); return new Filesystem(new CloudinaryAdapter($client)); }); }
/** * Bootstrap any application services. * * @return void */ public function boot() { Storage::extend('s3', function ($app, $config) { $client = S3Client::factory(['key' => env('AWS_KEY'), 'secret' => env('AWS_SECRET'), 'region' => env('AWS_REGION')]); $adapter = new AwsS3Adapter($client, env('AWS_BUCKET')); return new Filesystem($adapter); }); }
/** * Perform post-registration booting of services. */ public function boot() { /** * php artisan vendor:publish --provider="bernardomacedo\DBTranslator\DBTranslatorServiceProvider" */ $this->publishes([__DIR__ . '/../resources/config/laravel-db-translator.php' => config_path('db-translator.php')], 'config'); $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'dbtranslator'); $this->publishes([__DIR__ . '/../resources/lang' => base_path('resources/lang/vendor/dbtranslator')], 'lang'); if (!class_exists('CreateTranslationsTable')) { // Publish the migration $timestamp = date('Y_m_d_His', time()); $this->publishes([__DIR__ . '/../resources/migrations/create_translations_tables.php.stub' => $this->app->basePath() . '/database/migrations/' . $timestamp . '_create_translations_tables.php'], 'migrations'); } /** * Create an helper file for using at blade like {{ intl() }} */ require_once __DIR__ . '/Helpers/intl.php'; Storage::extend('translations', function () { $client = ['driver' => 'local', 'root' => base_path('resources/vendor/dbtranslator')]; return new Filesystem($client); }); }
/** * Perform post-registration booting of services. * * @return void */ public function boot() { Storage::extend('sftp', function ($app, $config) { return new Filesystem(new SftpAdapter(['host' => $config['host'], 'port' => $config['port'], 'username' => $config['username'], 'password' => $config['password'], 'privateKey' => $config['privateKey'], 'root' => $config['root'], 'timeout' => $config['timeout']])); }); }
/** * Bootstrap the application services. * * @return void */ public function boot() { Storage::extend('dag', function ($app, $config) { return new Filesystem(new DagAdapter($config)); }); }
/** * Bootstrap any application services. * * @return void */ public function boot() { Storage::extend('gae', function ($app, $config) { return new Flysystem(new GaeFilesystemAdapter($config['root'])); }); }