When using Laravel\'s Eloquent ORM, I can\'t seem to set the $hidden and $visible properties on my Model dynamically.
Example 1: This works:
As $visible is set on an instance level (i.e. it's not a static variable shared between all models of the same type), no - there's no better way to do this.
$visible