Declaration of Illuminate\Database\Eloquent\Factories\HasFactory::newFactory() must be compatible with Bazar\Models\User::newFactory(): ?Bazar\Database\Factories\UserFactory
Closed this issue · 2 comments
larsbo commented
- Bazar Version: 0.9.1
- Laravel Version: 8.53.1
- PHP Version: 7.4.22
- Database Driver & Version: mysql 14.14
Description:
During registration the following error occures:
Declaration of Illuminate\Database\Eloquent\Factories\HasFactory::newFactory() must be compatible with Bazar\Models\User::newFactory(): ?Bazar\Database\Factories\UserFactory
Steps To Reproduce:
- fresh laravel installation
- install laravel/breeze
- install conedevelopment/bazar
- extending the default user model
- defining admins
- register a new user
mwamodo commented
Got the same error but realized that Bazar'Models\User uses hasFactory too. Just remove 'hasFactory' from your projects User Model.