Skip to content

Laravel-RootX/Laravel-MongoDB-CRUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB PHP driver installed

Make sure you have the MongoDB PHP driver installed. You can find installation instructions at http://php.net/manual/en/mongodb.installation.php

For Windows: https://pecl.php.net/package/mongodb/1.7.4/windows

.env

MONGO_DB_HOST=127.0.0.1
MONGO_DB_PORT=27017
MONGO_DB_DATABASE=mongodatabase
MONGO_DB_USERNAME=
MONGO_DB_PASSWORD=

Add array details on database.php config file. (config/database.php)

 'mongodb' => 
[
    'driver'   => 'mongodb',
    'host'     => env('MONGO_DB_HOST', 'localhost'),
    'port'     => env('MONGO_DB_PORT', 27017),
    'database' => env('MONGO_DB_DATABASE'),
    'username' => env('MONGO_DB_USERNAME'),
    'password' => env('MONGO_DB_PASSWORD'),
    'options'  => []
],

Install Package:

composer require jenssegers/mongodb

Laravel-mongodb package via the Composer package manager

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published