Skip to content

Commit 3793850

Browse files
authored
Using contextual $app
1 parent 9147d9a commit 3793850

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/LaravelK8sServiceProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ public function boot()
2121
__DIR__.'/../config/k8s.php', 'k8s'
2222
);
2323

24-
$this->app->bind('laravel.k8s', function () {
25-
$connection = config('k8s.default', 'kubeconfig');
24+
$this->app->bind('laravel.k8s', function ($app) {
25+
$config = $app['config']['k8s'];
26+
$connection = $config['default'] ?? 'kubeconfig';
2627

2728
return new KubernetesCluster(
28-
$this->app['config']['k8s']['connections'][$connection] ?? []
29+
$config['connections'][$connection] ?? []
2930
);
3031
});
3132
}

0 commit comments

Comments
 (0)