Laravel 5 如何连接上mongodb

小白 表示对框架一窍不通 目前正在安装整个框架 一些概念还不是很懂,如果编写后台代码 该怎么去编写?谢谢
已邀请:

萧晔离 - 一个脱离了高级趣味的人。

赞同来自:

目前 Laravel 支持四种数据库系统: MySQL、Postgres、SQLite、以及 SQL Server。

不过你可以看看这个:https://github.com/jenssegers/laravel-mongodb

do_while

赞同来自:

装好了,但是不会配置啊,谁能具体说下怎么配啊

梦小天

赞同来自:

执行安装时出现这些问题,请指教!谢谢
Problem 1
- The requested package jenssegers/mongodb No version set (parsed as 1.0.0) could not be found.
Problem 2
- mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1].

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04 ... bility> for more details.

Read <https://getcomposer.org/doc/ar ... ing.md> for further common problems.
To enable extensions, verify that they are enabled in those .ini files:
- /usr/local/etc/php/5.6/php.ini
- /usr/local/etc/php/5.6/conf.d/ext-igbinary.ini
- /usr/local/etc/php/5.6/conf.d/ext-intl.ini
- /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini
- /usr/local/etc/php/5.6/conf.d/ext-mongo.ini
- /usr/local/etc/php/5.6/conf.d/ext-redis.ini
- /usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
You can also run
php --ini
inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

peng

赞同来自:

确实不错的的撒的撒撒ads按时按时

青城梦远

赞同来自:

composer require jenssegers/mongodb 执行这个命令就报错,没有安装是什么问题啊????

右耳

赞同来自:

你的php没有安装mongodb扩展
mac 下使用brew安装扩展或者其他方式安装
brew install josegonzalez/php/php56-mongodb

要回复问题请先登录注册