Skip to content

Commit 86123f9

Browse files
committed
update the provider
- migrations methods
1 parent ab880f2 commit 86123f9

2 files changed

Lines changed: 79 additions & 62 deletions

File tree

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Total Downloads][ico-downloads]][link-downloads]
66

77

8-
Use Laravel [Collective's Remote (SSH)](https://laravelcollective.com/docs/5.3/ssh) package to depoly your websites with the click of a button.
8+
Use Laravel [Collective's Remote (SSH)](https://laravelcollective.com/docs/5.3/ssh) package to depoly your websites with the click of a button. Works on PC/MAC/Linux.
99

1010
### Screenshot
1111

@@ -86,6 +86,15 @@ __Config__
8686

8787
php artisan vendor:publish --tag=deploykit-config
8888

89+
```
90+
91+
__Migrations__
92+
93+
``` bash
94+
95+
php artisan vendor:publish --tag=deploykit-migrations
96+
97+
8998
```
9099

91100
__Provider__
@@ -98,6 +107,8 @@ php artisan vendor:publish --provider="ShawnSandy\Deploykit\DeploykitServicesPro
98107

99108
```
100109

110+
111+
101112
__Add the dollowing lines to your `routes\web.php`__
102113

103114
``` php
@@ -136,7 +147,7 @@ return [
136147

137148
```
138149

139-
__Setup and configure Remote (SSH)__ [#Basic Usage](https://laravelcollective.com/docs/5.3/ssh#basic-usage)
150+
__Setup and configure Remote (SSH)__ [#Config](https://laravelcollective.com/docs/5.3/ssh#configuration)
140151

141152

142153
### Advanced Usage

src/DeploykitServicesProvider.php

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,86 @@
11
<?php
22

3-
namespace ShawnSandy\DeployKit;
3+
namespace ShawnSandy\DeployKit;
44

5-
use Illuminate\Support\ServiceProvider;
6-
use ShawnSandy\Deploykit\Libs\Deploys;
5+
use Illuminate\Support\ServiceProvider;
6+
use ShawnSandy\Deploykit\Libs\Deploys;
77

8-
/**
9-
* Class Provider
10-
*
11-
* @package ShawnSandy\PkgStart
12-
*/
13-
14-
class DeploykitServicesProvider extends ServiceProvider
15-
{
168
/**
17-
* Perform post-registration booting of services.
9+
* Class Provider
1810
*
19-
* @return void
11+
* @package ShawnSandy\PkgStart
2012
*/
21-
public function boot()
13+
class DeploykitServicesProvider extends ServiceProvider
2214
{
23-
if (!$this->app->routesAreCached()) {
24-
include __DIR__ . '/routes.php';
25-
}
26-
2715
/**
28-
* Package views
16+
* Perform post-registration booting of services.
17+
*
18+
* @return void
2919
*/
30-
$this->loadViewsFrom(__DIR__ . '/resources/views', 'deploys');
31-
$this->publishes(
32-
[
33-
__DIR__ . '/resources/views' => resource_path('views/vendor/deploykit'),
34-
], 'deploykit-views'
35-
);
20+
public function boot()
21+
{
22+
if (!$this->app->routesAreCached()) {
23+
include __DIR__ . '/routes.php';
24+
}
3625

37-
/**
38-
* Package assets
39-
*/
40-
$this->publishes(
41-
[
42-
__DIR__.'/resources/assets/js/' => public_path('assets/deploykit/js/'),
43-
__DIR__.'/public/assets/' => public_path('assets/')
44-
], 'deploykit-assets'
45-
);
26+
/**
27+
* Package views
28+
*/
29+
$this->loadViewsFrom(__DIR__ . '/resources/views', 'deploys');
30+
$this->publishes(
31+
[
32+
__DIR__ . '/resources/views' => resource_path('views/vendor/deploykit'),
33+
], 'deploykit-views'
34+
);
4635

47-
/**
48-
* Package config
49-
*/
50-
$this->publishes(
51-
[__DIR__ . '/config/config.php' => config_path('deploykit.php')],
52-
'deploykit-config'
53-
);
36+
/**
37+
* Package assets
38+
*/
39+
$this->publishes(
40+
[
41+
__DIR__ . '/resources/assets/js/' => public_path('assets/deploykit/js/'),
42+
__DIR__ . '/public/assets/' => public_path('assets/')
43+
], 'deploykit-assets'
44+
);
5445

55-
if (!$this->app->runningInConsole()) :
56-
include_once __DIR__ . '/Helpers/helper.php';
57-
endif;
46+
/**
47+
* Package config
48+
*/
49+
$this->publishes(
50+
[__DIR__ . '/config/config.php' => config_path('deploykit.php')],
51+
'deploykit-config'
52+
);
5853

59-
}
54+
if (!$this->app->runningInConsole()) :
55+
include_once __DIR__ . '/Helpers/helper.php';
56+
endif;
6057

61-
/**
62-
* Register any package services.
63-
*
64-
* @return void
65-
*/
66-
public function register()
67-
{
68-
69-
$this->mergeConfigFrom(
70-
__DIR__ . '/config/config.php', 'deploykit'
71-
);
58+
$this->loadMigrationsFrom(__DIR__.'/migrations/2017_02_15_141807_create_server_deploys_table.php');
59+
60+
$this->publishes([
61+
__DIR__.'/migrations/2017_02_15_141807_create_server_deploys_table.php' => database_path('migrations')
62+
], 'deploykit-migrations');
63+
64+
65+
}
7266

73-
$this->app->bind(
74-
'Deploys', function () {
67+
/**
68+
* Register any package services.
69+
*
70+
* @return void
71+
*/
72+
public function register()
73+
{
74+
75+
$this->mergeConfigFrom(
76+
__DIR__ . '/config/config.php', 'deploykit'
77+
);
78+
79+
$this->app->bind(
80+
'Deploys', function () {
7581
return new Deploys();
7682
}
77-
);
83+
);
7884

85+
}
7986
}
80-
}

0 commit comments

Comments
 (0)