Skip to content

A package to get Laravel Passport working with MongoDB

License

Notifications You must be signed in to change notification settings

mvjacobs/mongodb-passport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaraUtils MongoDB Passport

A service provider to add support for Laravel Passport and MongoDB.

Table of contents

Installation

Installation using composer:

composer require larautils/mongodb-passport

You need to have your App\User class extend LaraUtils\MongoDb\Passport\Models\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 LaraUtils\MongoDb\Passport\Models\User as Authenticatable;

class User extends Authenticatable
{
    use Notifiable;
}

Laravel version Compatibility

Laravel Package
5.6.x 2.0.x

And add the service provider in config/app.php:

LaraUtils\MongoDb\Passport\PassportServiceProvider::class,

The service provider will overide the default laravel passport models in order to use mongodb's implementation of eloquent. There is no need to register any additional classes or add any additional configuration other than those outlined in Laravel Passport and MongoDB.

About

A package to get Laravel Passport working with MongoDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%