I am getting below error when i run php artisan passport:install
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "passport" namespace.
I am getting below error when i run php artisan passport:install
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "passport" namespace.
For installing laravel passport make sure you add this line to config/app.php in the providers array (package service providers section):
Laravel\Passport\PassportServiceProvider::class,
Then install the package and migrate the database
composer require laravel/passport
php artisan migrate
php artisan passport:install
Clearing out the cache is generally helpful first step when commands are not working, especially when you update anything in the config folder on .env files.
php artisan config:clear
php artisan config:cache
Config clear removes the configuration cache file. Config cache creates a new configuration cache file with the current settings. Config cache enables faster load times for your apps!
composer require laravel/passport
I obtain Problem 1 - Conclusion: remove laravel/framework v5.5.48 - Conclusion: don't install laravel/framework v5.5.48 - laravel/passport v8.4.1 requires illuminate/http ^6.0|^7.0 -> satisfiable by illuminate/
How Can I install Passport? –
Venter I got solution. After running following two commands every thing work fine.
php artisan cache:clear
php artisan config:cach
I was searching for a solution for this and I found simple one that worked for me:
Add these lines to $commands
array in app/Console/Kernel.php
\Laravel\Passport\Console\InstallCommand::class,
\Laravel\Passport\Console\KeysCommand::class,
\Laravel\Passport\Console\ClientCommand::class,
Just follow these steps:
Try running composer require laravel/passport "~9.0"
before running php artisan passport:install
Here Is the solution of install Laravel passport with mongodb:
Just replace the Illuminate\Database\Eloquent\Model;
with Jenssegers\Mongodb\Eloquent\Model
in below files:
..\vendor\laravel\passport\src\Token.php,
..\vendor\laravel\passport\src\AuthCode.php
..\vendor\laravel\passport\src\Client.php
..\vendor\laravel\passport\src\PersonalAccessClient.php
and protected $table= "Table_name"
variable with protected $collection="Table_name"
For laravel 10 jus run the below command
composer require laravel/passport --ignore-platform-reqs
© 2022 - 2025 — McMap. All rights reserved.