conedevelopment / bazar

Bazar is an e-commerce package for Laravel applications.
https://root.conedevelopment.com
MIT License
427 stars 57 forks source link

Declaration of Illuminate\Database\Eloquent\Factories\HasFactory::newFactory() must be compatible with Bazar\Models\User::newFactory(): ?Bazar\Database\Factories\UserFactory #172

Closed larsbo closed 1 year ago

larsbo commented 3 years ago

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:

mwamodo commented 3 years ago

Got the same error but realized that Bazar'Models\User uses hasFactory too. Just remove 'hasFactory' from your projects User Model.

larsbo commented 3 years ago

Works fine after removing the HasFactory trait from User model, thx @mwamodo !