castAndSet

This can be used to cast and set a single public property.

$product = new Product();
$product->castAndSet('is_active', 1);

Last updated