Skip to content

Commit 28f1792

Browse files
committed
Update Laravel
1 parent 9c4ea5b commit 28f1792

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
A PHP library for the Docker Engine API
66

77
* [问题反馈](https://github.com/khs1994-docker/lnmp/issues/332)
8-
98
* [Docker API Docs](https://docs.docker.com/engine/api/v1.37/)
10-
119
* [Docs](https://khs1994-docker.github.io/libdocker/)
1210

11+
## 微信订阅号
12+
13+
<p align="center">
14+
<img width="200" src="https://user-images.githubusercontent.com/16733187/46847944-84a96b80-ce19-11e8-9f0c-ec84b2ac463e.jpg">
15+
</p>
16+
17+
<p align="center"><strong>关注项目作者微信订阅号,接收项目最新动态</strong></p>
18+
1319
## Installation
1420

1521
To Use Docker PHP Library, simply:
@@ -70,7 +76,7 @@ var_dump($docker_container->logs($container_id));
7076
$ php artisan vendor:publish --tag=config
7177
```
7278

73-
Then edit `config/docker.php`
79+
Then edit config file `config/docker.php`
7480

7581
```php
7682
use Docker;
@@ -86,12 +92,12 @@ docker()->container()->list();
8692
class MyController
8793
{
8894
public $docker;
89-
95+
9096
public function __construct(\Docker\Docker $docker)
9197
{
9298
$this->docker = $docker;
9399
}
94-
100+
95101
public function demo()
96102
{
97103
$this->docker->container()->list();

src/Docker/Kernel/Facade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ class Facade extends \Illuminate\Support\Facades\Facade
2323
{
2424
protected static function getFacadeAccessor()
2525
{
26-
return \Docker\Docker::class;
26+
return 'docker';
2727
}
2828
}

src/Docker/Kernel/ServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function register(): void
2828

2929
$this->mergeConfigFrom($configPath, 'docker');
3030

31-
$this->app->singleton(Docker::class, function () {
31+
$this->app->singleton('docker', function () {
3232
$app_name = config('docker.default');
3333

3434
return Docker::docker(Docker::createOptionArray(
@@ -42,7 +42,7 @@ public function register(): void
4242
));
4343
});
4444

45-
$this->app->alias(Docker::class, 'docker');
45+
$this->app->alias('docker', Docker::class);
4646
}
4747

4848
/**
@@ -52,6 +52,6 @@ public function register(): void
5252
*/
5353
public function provides()
5454
{
55-
return [Docker::class];
55+
return ['docker'];
5656
}
5757
}

src/Docker/Kernel/Support/helpers.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ function docker()
1818

1919
class Docker extends \Docker\Kernel\Facade
2020
{
21-
2221
}

0 commit comments

Comments
 (0)