Model factories seems not to be working as expected #123
Unanswered
dominik-eller
asked this question in
Q&A
Replies: 1 comment
-
@freekmurze I am sure you have a simple solution for me. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am tinkering around with this package and I did not get model factories to work.
So I tried a package I know from spatie and get the exact same issue.
> Spatie\UptimeMonitor\Models\Monitor::class
= "Spatie\UptimeMonitor\Models\Monitor"
> Spatie\UptimeMonitor\Models\Monitor::factory()
Error Class "Database\Factories\Spatie\UptimeMonitor\Models\MonitorFactory" not found.
> Spatie\UptimeMonitor\Models\Monitor::factory()->make()
Error Class "Database\Factories\Spatie\UptimeMonitor\Models\MonitorFactory" not found.
So it seems that the model factory is not found or cannot be loaded.
In composer.json the psr-4 section looks like that:
I compared my package created with the spatie laravel package skeleton and using spatie laravel package tools with spatie laravel uptime monitor.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions