Hide a resource variable from the documentation #522
Unanswered
prullenbak
asked this question in
Q&A
Replies: 1 comment
-
I found So I've added @ignoreParam into rules and into code where I get this param in code |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Nice package! But I have a problem: I have some variables in my resources that are only visible by admins. These are hidden in my resources with (simplified)
'field' => $this->when(auth()->user()->can('some-permission'), $this->field),
This hides the field from my normal users fine, however, the 'field' does show up in the scramble documentation. I'd like to be able to hide this field from the docs. Is this possible? I tried the @ignoreParam annotation but that didn't work.
Simply removing the field from the resource won't work, because I'm using the resources in my application to send data to my Inertia front-end. Of course, making a separate resource for this is an option, but If I could simply hide the variable with an annotation, that would be way simpler :)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions