2017 © Pedro Peláez
 

library mongo

MongoDB driver, auth, passport for Laravel

image

markustripp/mongo

MongoDB driver, auth, passport for Laravel

  • Monday, March 12, 2018
  • by markustripp
  • Repository
  • 2 Watchers
  • 7 Stars
  • 362 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 4 Versions
  • 18 % Grown

The README.md

Laravel Package for MongoDB support

See Laravel 5.5 Package Development, (*1)

Quick Start Guide

  • Create a Laravel 5.5 project: composer create-project laravel/laravel myproject dev-develop
  • cd myproject
  • Add dependency: composer require markustripp/mongo
  • Copy configuration: php artisan vendor:publish

Now you are ready to use the Mongo Facade, e.g. open routes/web.php:, (*2)

``` PHP <?php, (*3)

Route::get('mongo', function(Request $request) { $collection = Mongo::get()->mydatabase->mycollection; return $collection->find()->toArray(); });, (*4)

Route::get('/', function () { return view('welcome'); });, (*5)


Add a document to mycollection in mydatabase and open the browser at http://myproject.dev/mongo To override the default MongoDB connection configuration add the following parameters to your .env file. Find a detailed description on the [MongoDB Driver Manager Page](http://php.net/manual/en/mongodb-driver-manager.construct.php). Use JSON notation within single quotes `'` for options.

MONGO_URI=mongodb://127.0.0.1:27017 MONGO_URI_OPTIONS='{"appname": "app", "replicaSet": "repl"}' MONGO_DRIVER_OPTIONS= ```, (*6)

The Versions

12/03 2018

dev-master

9999999-dev

MongoDB driver, auth, passport for Laravel

  Sources   Download

MIT

The Requires

 

by Markus Tripp

17/08 2017

v1.0.2

1.0.2.0

MongoDB driver, auth, passport for Laravel

  Sources   Download

MIT

The Requires

 

by Markus Tripp

11/08 2017

v1.0.1

1.0.1.0

MongoDB driver, auth, passport for Laravel

  Sources   Download

MIT

The Requires

 

by Markus Tripp

10/08 2017

v1.0.0

1.0.0.0

MongoDB driver, auth, passport for Laravel

  Sources   Download

MIT

The Requires

 

by Markus Tripp