List Resources - GetTabs: modifyQueryUsing not working with relationships or scopes
Hi everyone,
I'm working on setting up multiple tabs in a List for a particular resource. The idea is to have each tab display Companies, filtered by their type. I've included a code snippet for your reference.
When I navigate to the resource list, I run into an error mentioning an undefined method called onlyManufacturers, which is actually a scope in my model. I've also tried running the query without using the scope, but I'm still encountering issues.
I've attached a screenshot of the
dd($builder)
output as well, just in case it's helpful.
Is it possible that I'm missing something here, or could there be something off in the documentation?
Thanks in advance for your help!5 Replies
Solution
Try . I think the injection should be $query. I could easily be wrong
Also, as per #✅┊rules ... don't send screenshots of code. Some of us are old farts and we can't read code screenshots.
So if you haven't done so already, you should definitely read the rules.
When your code example is short please format it using backticks
.
Use GitHub Gists for long code examples. Don't send screenshots of code.
Thank you for pointing it out. My bad, I redacted the original question.
Thanks!