F
Filament14mo ago
Roberto

NULL email_verified_at

i have signed up in admin panel and i received confirmation email. i clicked it to verify. all good but, it is not chainging email_verified_at field in users table. how to fix this? ty
No description
8 Replies
Roberto
RobertoOP14mo ago
this is the panel code
No description
Roberto
RobertoOP14mo ago
after i verify my email by clicking verification link. it is not updating email_verified_at field in table.
awcodes
awcodes14mo ago
Is email_verified_at in your model’s fillable array?
Roberto
RobertoOP14mo ago
it is not in fillable. i just did Model::unguard() thank you. it worked
Vp
Vp14mo ago
I would suggest to rollback Model::unguard() and provide $fillable or $guarded in model. You can encounter some un-wanted data. Ref mass assignment here https://laravel.com/docs/10.x/eloquent#mass-assignment
Roberto
RobertoOP14mo ago
ok. thank you I thought filament recommends Model::unguard()
Vp
Vp14mo ago
For inside filament we can unguarded safely. But if you want your model outside filament then you can encounter some problem
Roberto
RobertoOP14mo ago
got it thank you
Want results from more Discord servers?
Add your server