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.
Related Issues (20)
- It just doesn't suggest methods from Illuminate\Database\Eloquent\Builder on my model, like "first()" or "where()" HOT 4
- Installation error on latest laravel installation HOT 3
- Is it Possible to Add auto-complete in form request classes?
- Models that have `static::$snakeAttributes` set to `true` should use attribute names without case conversion
- Allow configuration of the expectedMixins when calling Eloquent::writeEloquentModelHelper()
- Model's --write duplicates array properties that have summary and array key-value types added HOT 3
- Modifications required to support Laravel 11 HOT 1
- [idea] Refactor to use phpstan/phpdoc-parser HOT 2
- [2.15.0] Inserting AllowDynamicProperties attribute breaks final classes HOT 4
- Nova Resources HOT 8
- Mixin Information Provided by Packages HOT 2
- Attribute accessor/mutator without the counterparts generate wrong model properties HOT 1
- Support for Eloquent Scope extensions HOT 1
- Not working with MSSQL 2016 and below HOT 2
- Wrong return type get() method HOT 1
- @mixin Alternative HOT 1
- I believe I've been able to improve some of the intellisense for model queries, please implement this (but maybe expand it first) HOT 4
- Comment keeps getting appended
- The command "ide-helper:models" is not working correctly. HOT 1
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.