Skip to content

Commit a0827be

Browse files
author
rokde
committed
config files documentation added
1 parent 611fca2 commit a0827be

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,31 @@ Package Manager manages generation of a new package and provides a basic service
1414
There is no direct generation for now. So please use the PackageServiceProvider as base class of your package service provider and implement the various interfaces for providing dependent stuff.
1515

1616

17+
### Package providing configuration files
18+
19+
Simply implement our `DefinesConfigurations` interface.
20+
21+
```php
22+
class YOURPACKAGEServiceProvider extends PackageServiceProvider implements DefinesConfigurations
23+
```
24+
25+
Add your configuration files:
26+
```php
27+
/**
28+
* returns an array of config files with their corresponding config_path(name)
29+
*
30+
* @return array
31+
*/
32+
public function configurationFiles()
33+
{
34+
return [
35+
__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'your-package.php' => 'your-package.php',
36+
];
37+
}
38+
```
39+
40+
41+
1742
### Package providing database migrations
1843

1944
Simply implement our `DefinesMigrations` interface.
@@ -32,7 +57,7 @@ Add your migration source paths:
3257
public function migrations()
3358
{
3459
return [
35-
__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'migrations',
60+
__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR . 'migrations',
3661
];
3762
}
3863
```

0 commit comments

Comments
 (0)