F
Filament15mo 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
RobertoOP15mo ago
this is the panel code
No description
Roberto
RobertoOP15mo ago
after i verify my email by clicking verification link. it is not updating email_verified_at field in table.
awcodes
awcodes15mo ago
Is email_verified_at in your model’s fillable array?
Roberto
RobertoOP15mo ago
it is not in fillable. i just did Model::unguard() thank you. it worked
Vp
Vp15mo 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
RobertoOP15mo ago
ok. thank you I thought filament recommends Model::unguard()
Vp
Vp15mo ago
For inside filament we can unguarded safely. But if you want your model outside filament then you can encounter some problem
Roberto
RobertoOP15mo ago
got it thank you
Want results from more Discord servers?
Add your server