Calling to a model attribute function with and without optional parameters
I have in my model this function
public function getBoxAttribute()
...
public function getSphereAttribute($absolute = true)
...
When the function has no parameters, I can use the "short" call of the "get attribute" model:
This works $model->box;
and obviously this $model->getBoxAttribute();
But when the function has attributes...
this does not work: $model->sphere(false)
and I have to use this $model->getSphereAttribute(false);
Is it possible to name a "attribute" function in the model and call in the "short" way, no matter if they expect optional attributes or not ?