You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code I have been doing the following to explicitly set boolean values, the null part is redundant but anyway.
/**
* Set the attribute or explicity return null.
*
* @param [type] $value
*/
public function setSubsidaryRuleCAttribute($value)
{
$this->attributes['Subsidary_Rule__c'] = boolval($value ?? null);
}
Recently I wondered whether or not because the Lester\EloquentSalesForce\Model extends an abstract model class that itself extends a vanilla Eloquent model, whether you could use the $casts property?
In my code I have been doing the following to explicitly set boolean values, the null part is redundant but anyway.
Recently I wondered whether or not because the
Lester\EloquentSalesForce\Model
extends an abstract model class that itself extends a vanilla Eloquent model, whether you could use the$casts
property?So I tried it:
However, when testing I get the following:
Cannot deserialize instance of boolean from VALUE_STRING value 1 or request may be missing a required field at [line:1, column:2]
I'm wondering whether I don't understand $casts or whether this is a bug?
Thanks in advance.
The text was updated successfully, but these errors were encountered: