I am using Laravel 9 and Nova 4 and have a resource where a lot of the properties are nullable. I'd like the preview screen to only show a field if the value is not null. Looking at the nova docs methods like showOnIndex()
and showOnDetail()
etc accept a callback so that you can add a condition for whether to show them or not. Unfortunately the showOnPreview()
doesn't accept a callback so is there another way that I can conditionally tell Nova to only show the field in the preview if the value isn't null?
0 comments:
Post a Comment
Thanks