We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6cb5df7 + 975c6d8 commit f3533e7Copy full SHA for f3533e7
src/Module.php
@@ -229,8 +229,12 @@ private function registerMiddleware(): void
229
*/
230
private function registerFactories(): void
231
{
232
- // Unfortunately Laravel 8 no longer supports loading factories like this
233
- // because they want you to use ModelFactories.
+ if (
+ method_exists($this, 'loadFactoriesFrom') &&
234
+ file_exists($this->getModulePath().'/Database/Factories')
235
+ ) {
236
+ $this->loadFactoriesFrom($this->getModulePath().'/Database/Factories');
237
+ }
238
}
239
240
private function registerRoutes(): void
0 commit comments