Comments (5)
I can't make out anything in the screenshots, please paste the raw logs (use markdown "tripple-backticks" formatting please)
from laravel-ide-helper.
Of course, this is the log that returns:
Exception: No query results for model [App\Models\Role].
Could not analyze class App\Models\User.
Trace:
#0 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/app/Models/User.php(146): Illuminate\Database\Eloquent\Relations\BelongsToMany->firstOrFail()
#1 [internal function]: App\Models\User->abilityRolePermissions()
#2 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/barryvdh/laravel-ide-helper/src/Console/ModelsCommand.php(1148): ReflectionMethod->invoke(Object(App\Models\User))
#3 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/barryvdh/laravel-ide-helper/src/Console/ModelsCommand.php(595): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->getAttributeTypes(Object(App\Models\User), Object(ReflectionMethod))
#4 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/barryvdh/laravel-ide-helper/src/Console/ModelsCommand.php(289): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->getPropertiesFromMethods(Object(App\Models\User))
#5 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/barryvdh/laravel-ide-helper/src/Console/ModelsCommand.php(176): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->generateDocs(Array, Array)
#6 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->handle()
#7 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#8 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#9 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#10 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#11 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call(Array)
#12 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#13 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#14 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Barryvdh\LaravelIdeHelper\Console\ModelsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /Users/alejandrosalgado/Documents/Web/Sites/vue-app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 {main}
from laravel-ide-helper.
What is abilityRolePermissions()
? Is User.php(146)
part of that method?
I've a feeling this is what causes the problem: in \Barryvdh\LaravelIdeHelper\Console\ModelsCommand::getAttributeTypes
we're calling this code:
// Private/protected ReflectionMethods require setAccessible prior to PHP 8.1
$reflectionMethod->setAccessible(true);
/** @var Attribute $attribute */
$attribute = $reflectionMethod->invoke($model);
from laravel-ide-helper.
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.
from laravel-ide-helper.
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.
from laravel-ide-helper.
Related Issues (20)
- VsCode Go to definition not working
- ReflectionException in Alias::getMacroFunction HOT 1
- Phpstorm Redis Can you identify
- Unknown Column HOT 5
- Incorrect type for nullable morph HOT 3
- Two blank docblock lines in model HOT 1
- Thread docs bloks as primary source of type
- Nullable timestamps HOT 5
- Defining database in $table no longer works? HOT 2
- Support for casts AsEnumCollection HOT 3
- php artisan ide-helper:meta throws error PHP Warning: Trying to access array offset on value of type null HOT 2
- Expected type 'iterable'. Found 'Illuminate\Database\Query\iterable'. HOT 3
- newQuery and newModelQuery are not static methods
- MySqlGrammar: : compileColumns function for mariadb and mysql information_schema. The columns structure difference is an error HOT 1
- Json mysql column is translated as mixed instead of string
- As a Developer working on Windows I want the Line-Endings inside the generated PHP Doc to be CRLF HOT 3
- Exception: Method MongoDB\Laravel\Schema\Grammar::compileColumns does not exist. HOT 1
- Macro on HttpClient does not return correct Return statement
- Make model factory method annotation optional in phpDoc HOT 1
- Issues after Laravel 11.15 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-ide-helper.