Support the ongoing development of Laravel.io →
Database
Last updated 1 year ago.
0

try $casts in your models and if that doesnt work..

0

I tried that $casts protected array, but the toArray() outcome is the same...

0

i tested it.. so if you echo you get 1 or 0 but if you var_dump you get true/false.. not sure :s

you could also try getFieldAttribute() and return True/False.. but seems a bit of a hack?

0

What ORM are you using? If Doctrine try this

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.