tobytwigger /
nus-unioncloud-api-wrapper
| 1 | <?php |
||||
| 2 | /** |
||||
| 3 | * Service provider for UnionCloud |
||||
| 4 | */ |
||||
| 5 | |||||
| 6 | namespace Twigger\UnionCloud\API; |
||||
| 7 | |||||
| 8 | use Illuminate\Support\ServiceProvider; |
||||
| 9 | |||||
| 10 | |||||
| 11 | /** |
||||
| 12 | * Allow Laravel to use UnionCloud |
||||
| 13 | * Class UnionCloudServiceProvider |
||||
| 14 | * |
||||
| 15 | * @package Twigger\UnionCloud\API\Laravel |
||||
| 16 | */ |
||||
| 17 | class UnionCloudServiceProvider extends ServiceProvider |
||||
| 18 | { |
||||
| 19 | |||||
| 20 | /** |
||||
| 21 | * Indicates if loading of the provider is deferred. |
||||
| 22 | * |
||||
| 23 | * @var bool |
||||
| 24 | */ |
||||
| 25 | protected $defer = false; |
||||
| 26 | |||||
| 27 | /** |
||||
| 28 | * Bootstrap the application events. |
||||
| 29 | * |
||||
| 30 | * @return void |
||||
| 31 | */ |
||||
| 32 | public function boot() |
||||
| 33 | { |
||||
| 34 | $this->publishes([ |
||||
| 35 | __DIR__.'/../publish/config/unioncloud.php' => config_path('unioncloud.php'), |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 36 | ], 'configtest'); |
||||
| 37 | |||||
| 38 | } |
||||
| 39 | |||||
| 40 | /** |
||||
| 41 | * Register the service provider. |
||||
| 42 | * |
||||
| 43 | * @return void |
||||
| 44 | */ |
||||
| 45 | public function register() |
||||
| 46 | { |
||||
| 47 | |||||
| 48 | $this->app->singleton('Twigger\UnionCloud\API\UnionCloud', function($app){ |
||||
| 49 | $unionCloud = new UnionCloud([ |
||||
| 50 | 'email' => config('unioncloud.v0auth.email', 'email'), |
||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 51 | 'password' => config('unioncloud.v0auth.password', 'password'), |
||||
| 52 | 'appID' => config('unioncloud.v0auth.appID', 'appID'), |
||||
| 53 | 'appPassword' => config('unioncloud.v0auth.appPassword', 'appPassword'), |
||||
| 54 | ]); |
||||
| 55 | $unionCloud->setBaseURL(config('unioncloud.baseURL', 'union.unioncloud.org')); |
||||
| 56 | return $unionCloud; |
||||
| 57 | }); |
||||
| 58 | } |
||||
| 59 | |||||
| 60 | } |