Skip to content

Commit ec3c4cc

Browse files
author
rokde
committed
routes support added
1 parent 6efe4a9 commit ec3c4cc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,28 @@ Add your view source paths:
9292
When publishing, the view tag will be `view`.
9393

9494

95+
### Package providing routes via file
96+
97+
Simply implement our `DefinesRoutes` interface.
98+
99+
```php
100+
class YOURPACKAGEServiceProvider extends PackageServiceProvider implements DefinesRoutes
101+
```
102+
103+
Add your routes source path:
104+
```php
105+
/**
106+
* returns routes.php file (absolute path)
107+
*
108+
* @return string
109+
*/
110+
public function routesFile()
111+
{
112+
return __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'routes' . DIRECTORY_SEPARATOR . 'web.php';
113+
}
114+
```
115+
116+
95117
## License
96118

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

0 commit comments

Comments
 (0)