thulisoft/laravel-mongodb-passport

A package to allow laravel 8 /passport use with jenssegers/laravel-mongodb

dev-main 2021-04-26 09:33 UTC

This package is auto-updated.

Last update: 2024-04-08 20:20:28 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,