-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: No query results for model inside on mutator or accessor #1540
Comments
I can't make out anything in the screenshots, please paste the raw logs (use markdown "tripple-backticks" formatting please) |
Of course, this is the log that returns:
|
What is I've a feeling this is what causes the problem: in // Private/protected ReflectionMethods require setAccessible prior to PHP 8.1
$reflectionMethod->setAccessible(true);
/** @var Attribute $attribute */
$attribute = $reflectionMethod->invoke($model); |
Yes, it's a mutator/accessor where I obtain the permissions of the user role, for that there I call the role relationship that my User model has, after that I call the permissions() relationship that my Role model has. |
I can't fully make sense of your problem. Your best change is to reduce it to a minimal reproducible example and put it up in a repo so me/someone can check it out. |
Versions:
Question:
I want to generate the properties and methods of my user model and I have these two access mutators and accessors that I need in my frontend which obtain the user roles and permissions permissions
But when running the command
php artisan ide-helper:models -W
I get the following error:Any solution to this problem?
The text was updated successfully, but these errors were encountered: