File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,28 @@ Add your view source paths:
92
92
When publishing, the view tag will be ` view ` .
93
93
94
94
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
+
95
117
## License
96
118
97
119
Package Manager is open-sourced software licensed under the [ MIT license] ( http://opensource.org/licenses/MIT )
You can’t perform that action at this time.
0 commit comments