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