After installation I am getting following error... No query result for model App\User

uday-kothari

Feb 27th, 2023 11:30 AM

C:\Uday\Research\hirebygpt>php artisan voyager:admin [email protected]

Illuminate\Database\Eloquent\ModelNotFoundException : No query results for model [App\User].

at C:\Uday\Research\hirebygpt\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php:479 475| if (! is_null($model = $this->first($columns))) { 476| return $model; 477| } 478|

479| throw (new ModelNotFoundException)->setModel(get_class($this->model)); 480| } 481| 482| /** 483| * Execute the query and get the first result or call a callback.

Exception trace:

1 Illuminate\Database\Eloquent\Builder::firstOrFail() C:\Uday\Research\hirebygpt\vendor\tcg\voyager\src\Commands\AdminCommand.php:159

2 TCG\Voyager\Commands\AdminCommand::getUser() C:\Uday\Research\hirebygpt\vendor\tcg\voyager\src\Commands\AdminCommand.php:52

Please use the argument -v to see more details.

bobbyiliev

Feb 27th, 2023 01:44 PM

Hi there,

Would you mind sharing some more information here like:

  • Are you using Wave or just a plain Laravel installation with Voyager?
  • Did you run php artisan migrate and php artisan db:seed already?
  • What type of database are you using? Is it MySQL or Postgres?
  • What is your PHP version?
  • As you are using Windows, have you tried using Laragon?
uday-kothari

Feb 27th, 2023 10:32 PM

  1. Using plain Laravel installation with Voyager
  2. Yes I run php artisan migrate as well as php artisan db:seed
  3. I am using Postgres
  4. PHP version is 7.3
  5. Yes, I am using Windows
bobbyiliev

Feb 28th, 2023 12:37 AM

What version of Laravel are you using and did you run the php artisan voyager:install --with-dummy command before running the php artisan voyager:admin [email protected]?