Although it says here that there is “no need to run the $resource->save()
method as that happens automatically”, I can only see the change in the database when I actually call $resource->save();
.
if ($resource->getTVValue('HideMenu')) {
$resource->set('hidemenu', '1');
$resource->save();
} else {
$resource->set('hidemenu', '0');
$resource->save();
}