Laravel Jenssegers/MongoDB Supports Laravel Passport by Another Dependency

Previously I try to created a Laravel REST/ful API using mongoDB, all good until I was doing:

php artisan passport:install

it showed me error like this:

Then I was trying to use designmynight/laravel-mongodb-passport dependency and It worked, let me show you how to use it.

Step 1: Installing the dependency

First step you need to install the dependency:

composer require designmynight/laravel-mongodb-passport

Step 2: Adding Service Provider

Open config/app.php and then adding this service provider:


— Completed —

How easy was that? If you found any problem, please leave me a comment below, let’s discuss that problem?

I wrote these tutorials for myself in future when I forget for the next steps.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store