knuckleswtf / knuckleswtf/scribe
How to deal with custom fields in laravel Resources?
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
### Scribe version
4
### Your question
I have a resource who returns custom fields that don't exist in the model, so Scribe is giving me this error:

Already tried using @mixin in the resource's docblock but it didn't work.
Controller is like this:

Can Anybody help me?
### Docs
- [X] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution
Contributor guide
Research direction
Review the Laravel Resource and controller examples shown in the issue, then compare their custom-field behavior with the Scribe Laravel documentation and troubleshooting guide. No source file or test is named; the issue would be resolved when the custom fields are either supported correctly or the required configuration and limitation are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100