https://github.com/designmynight/laravel-mongodb-passport
A package to get Laravel Passport working with MongoDB
https://github.com/designmynight/laravel-mongodb-passport
laravel laravel-5-package laravel-mongodb laravel-passport mongodb shared
Last synced: 9 months ago
JSON representation
A package to get Laravel Passport working with MongoDB
- Host: GitHub
- URL: https://github.com/designmynight/laravel-mongodb-passport
- Owner: designmynight
- License: mit
- Created: 2018-01-10T10:33:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-01T11:59:10.000Z (over 2 years ago)
- Last Synced: 2024-04-25T02:43:07.986Z (over 1 year ago)
- Topics: laravel, laravel-5-package, laravel-mongodb, laravel-passport, mongodb, shared
- Language: PHP
- Homepage:
- Size: 38.1 KB
- Stars: 68
- Watchers: 7
- Forks: 75
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Laravel MongoDB Passport
===============
[](https://packagist.org/packages/designmynight/laravel-mongodb-passport) [](https://packagist.org/packages/designmynight/laravel-mongodb-passport)
A service provider to add support for [Laravel Passport](https://github.com/laravel/passport) and [MongoDB](https://github.com/jenssegers/laravel-mongodb).
Table of contents
-----------------
* [Installation](#installation)
Installation
------------
Installation using composer:
```sh
composer require designmynight/laravel-mongodb-passport
```
You need to have your `App\User` class extend `DesignMyNight\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
register(DesignMyNight\Mongodb\MongodbPassportServiceProvider::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](https://github.com/laravel/passport) and [MongoDB](https://github.com/jenssegers/laravel-mongodb).