webdevbr/eloquent-zf2

Illuminate\Database 与 Zend Framework 2 的集成

安装: 12

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:zf-module

v1.0.0-alpha 2016-05-13 20:50 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:42:17 UTC


README

安装

运行

composer require webdevbr/eloquent-zf2

配置

config\autoload\global.php 中添加

return array(
    'database' => [
    	'default' => [
		    'driver'    => 'mysql',
		    'host'      => 'localhost',
		    'database'  => 'database',
		    'username'  => 'root',
		    'password'  => 'password',
		    'charset'   => 'utf8',
		    'collation' => 'utf8_unicode_ci',
		    'prefix'    => '',
		]
    ],
    'eloquent' => [
    	'database_default'=>'default',
    	'setAsGlobal'=>true,
    ]
);