webdecero/webdecero-package-laravel-passport

Enable use of laravel/passport with mongodb/laravel-mongodb

Maintainers

Package info

github.com/webdecero/webdecero-package-laravel-passport

pkg:composer/webdecero/webdecero-package-laravel-passport

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.2 2024-10-30 01:11 UTC

This package is not auto-updated.

Last update: 2026-03-27 19:37:27 UTC


README

Enable use of laravel/passport with mongodb/laravel-mongodb

Table of contents

Installation

Make sure you have the MongoDB PHP driver installed. You can find installation instructions at:

Requeriments

PHP extension

  • php: ^8.1

WARNING: The old mongo PHP driver is not supported.

Laravel version Compatibility

Laravel Package Passport
10.x 1.x 11.10.*
11.x 2.x 12.x

Installation using composer:

composer require webdecero/webdecero-package-laravel-passport

Optional Add the service provider to config/app.php:

Webdecero\Laravel\Passport\PassportServiceProvider::class

Configuration

In this new major release which supports the new mongodb PHP extension, we also moved the location of the Model class and replaced the MySQL model class with a trait.

Env File

DB_CONNECTION=mongodb
DB_HOST=localhost
DB_AUTHENTICATION_DATABASE=**your database authentication, for global authentication use admin**
DB_DATABASE=**your database**
DB_USERNAME=**your username**
DB_PASSWORD=**your password**
DB_PORT=27017