Skip to content

Commit ae1d383

Browse files
author
rokde
committed
view files documentation added
1 parent a0827be commit ae1d383

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Add your configuration files:
3838
```
3939

4040

41-
4241
### Package providing database migrations
4342

4443
Simply implement our `DefinesMigrations` interface.
@@ -66,6 +65,33 @@ Optional you can define the publishing of your database migrations by setting pr
6665

6766
When publishing, the tag will be `migrations`.
6867

68+
69+
### Package providing views
70+
71+
Simply implement our `DefinesViews` interface.
72+
73+
```php
74+
class YOURPACKAGEServiceProvider extends PackageServiceProvider implements DefinesViews
75+
```
76+
77+
Add your view source paths:
78+
```php
79+
/**
80+
* returns view file paths
81+
*
82+
* @return array|string[]
83+
*/
84+
public function views()
85+
{
86+
return [
87+
$this->packagePath . 'resources' . DIRECTORY_SEPARATOR . 'views',
88+
];
89+
}
90+
```
91+
92+
When publishing, the view tag will be `view`.
93+
94+
6995
## License
7096

7197
Package Manager is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

0 commit comments

Comments
 (0)