laravel-mongodb-passport maintained by thulisoft
Description
A package to allow laravel 8 /passport use with jenssegers/laravel-mongodb
Author
Last update
2021/04/26 11:33
(dev-main)
License
Downloads
3 453
Tags
Laravel 8 MongoDB Passport
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,