Best laravel framework open-source packages.

Laravel passport dingo sample

Demonstrates how to use Passport for authentication with a Dingo API.
Updated 3 years ago

Laravel Passport + Dingo Authentication Example

Demonstrates configuration of a Laravel project using Passport for authentication with a Dingo API, with a particular focus on internal requests.

To actually run this sample application, we need to to set up a database and copy the .env template:

cp .env.example .env

Then, add the database information to .env and execute the following commands:

composer update
php artisan key:generate
php artisan migrate
php artisan passport:install

We can now register a user and pop open the browser's JavaScript console in the developer tools to send API calls. See the API routes file for the endpoints and commands.

Check the files changed in the commit history to understand how this works.

For more information, see this Stack Overflow question.

Tags passport php