How to properly use a boolean Select field.

Hi there,

Having some trouble working out how boolean select fields are meant to work. If I call Select::make('my_field')->boolean('Yes', 'No', 'Select an option'), then it doesn't actually work if I pre-fill that field with an actual boolean. I suspect this is because the options are set to 0 and 1 by this and true !== 1.

How is this intended to be used? Should the field actually be treated as a number and cast to a boolean after the fact?
Was this page helpful?