Model::$visible is an allow list. If it is defined, only fields explicitly listed in the array must be visible.
This patch fixes the issue and adds some tests for the feature.
According to the docs, it's also possible to hide the field for an instance by using makeVisible() and makeHidden().
I may be wrong, but this feature doesn't seem to be currently supported. This should be fixed in a follow-up PR.
Model::$visible
is an allow list. If it is defined, only fields explicitly listed in the array must be visible. This patch fixes the issue and adds some tests for the feature.According to the docs, it's also possible to hide the field for an instance by using
makeVisible()
andmakeHidden()
. I may be wrong, but this feature doesn't seem to be currently supported. This should be fixed in a follow-up PR.