thulisoft / laravel-mongodb-passport
A package to allow laravel 8 /passport use with jenssegers/laravel-mongodb
Installs: 3 400
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.3
- illuminate/support: ^8.0
- jenssegers/mongodb: ^3.8
- laravel/passport: ^10.1
This package is auto-updated.
Last update: 2025-04-08 22:29:10 UTC
README
A service provider to add support for Laravel 8 Passport and MongoDB.
Table of contents
Installation
Installation using composer:
composer require thulisoft/laravel-mongodb-passport
You need to have your App\User
class extend MongoPassport\Mongodb\Auth\User.php
instead of the default Illuminate\Foundation\Auth\User
. This user class extends larvel-mongodb eloquent user as well as adding all the standard and required authentication and laravel passport traits.
<?php namespace App; use Illuminate\Notifications\Notifiable; use MongoPassport\Mongodb\Auth\User as Authenticatable; class User extends Authenticatable { use Notifiable; }
And add the service provider in config/app.php
:
MongoPassport\Mongodb\MongodbPassportServiceProvider::class,