I installed laravel passport using command compser require laravel/passsport
,
but after this, no new migration was made in database/migrations
directory.
Why is that?
You can store this token in local storage. This token is also stored in the oauth_access_tokens table. We will be sending a GET request to your URL and we need to send it token as Authorization Header. Above way successive technologies can do API authentication in Laravel Application with a passport.
@vincent15000 Passport is an OAuth server implementation, and used to offer OAuth authorisation for your application. Sanctum is an authentication library for “simpler” token-based authentication for clients that need it (i.e. mobile apps) but also offers cookie-based authentication for SPAs.
The migration files exist in the Passport package in your vendor directory.
The migrations won't be copied over to your database/migrations folder as they don't need to be since they're registered by the PassportServiceProvider
.
You should just be able to run php artisan migrate
and they will be included.
If you're using Laravel 5.3 or 5.4 then you will need to register the service provide in your app/config.php
file.
Make sure you have PassportServiceProvider registered in config/app.php
// config/app.php
Laravel\Passport\PassportServiceProvider::class,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With