Laravel 5.4 - Installing Passport Laravel 5.4 - Installing Passport laravel laravel

Laravel 5.4 - Installing Passport


Most likely you skipped one or two of the following steps:

Next, register the Passport service provider in the providers array of your config/app.php configuration file:

Laravel\Passport\PassportServiceProvider::class,

The Passport service provider registers its own database migration directory with the framework, so you should migrate your database after registering the provider. The Passport migrations will create the tables your application needs to store clients and access tokens:

php artisan migrate

Only after that can you run

php artisan passport:install


Laravel 5.4 provides larger default string length which can not be allowed.

Solution :

Modify AppServiceProvider.php file:

use Illuminate\Support\Facades\Schema;

Add the following line to the boot method:

public function boot(){    Schema::defaultStringLength(150);}