Skip to content

Commit 3b65b98

Browse files
author
Shawn McCool
committed
Merge pull request backup-manager#7 from dani3l/master
Bug fix & publish config command
2 parents 760e795 + 2aa09ba commit 3b65b98

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ BackupManager\Laravel\Laravel5BackupManagerServiceProvider::class,
7272

7373
Copy the `vendor/backup-manager/laravel/config/backup-manager.php` file to `app/config/backup-manager.php` and configure it to suit your needs.
7474

75+
If you are using Laravel 5 you can run this command to auto-publish the config file:
76+
```php
77+
php artisan vendor:publish --provider="BackupManager\Laravel\Laravel5BackupManagerServiceProvider"
78+
```
79+
7580
The Backup Manager will make use of Laravel's database configuration. But, it won't know about any connections that might be tied to other environments, so it can be best to just list multiple connections in the `config/database.php` file.
7681

7782
**IoC Resolution**

config/backup-manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
return [
44
'local' => [
55
'type' => 'Local',
6-
'root' => '/',
6+
'root' => storage_path('app'),
77
],
88
's3' => [
99
'type' => 'AwsS3',

src/Laravel5BackupManagerServiceProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class Laravel5BackupManagerServiceProvider extends ServiceProvider {
2222
* @return void
2323
*/
2424
public function boot() {
25-
$this->publishes([config_path() . "/backup-manager.php" => config_path('backup-manager.php')], 'backup-manager');
25+
$configPath = __DIR__ . '/../config/backup-manager.php';
26+
$this->publishes([$configPath => config_path('backup-manager.php')], 'config');
2627
}
2728

2829
/**
@@ -31,7 +32,8 @@ public function boot() {
3132
* @return void
3233
*/
3334
public function register() {
34-
$this->mergeConfigFrom(config_path() . '/backup-manager.php', 'backup-manager');
35+
$configPath = __DIR__ . '/../config/backup-manager.php';
36+
$this->mergeConfigFrom($configPath, 'backup-manager');
3537
$this->registerFilesystemProvider();
3638
$this->registerDatabaseProvider();
3739
$this->registerCompressorProvider();

0 commit comments

Comments
 (0)