fizzday/booter
最新稳定版本:v5.8.24
Composer 安装命令:
composer require fizzday/booter
包简介
a mini booter of some services
README 文档
README
a mini booter of some services, now you can use laravel's orm of eloquent in either php project with this booter
Installation
Use composer to manage your dependencies and download:
composer require fizzday/booter
Example
-
1.Eloquent
- config & boot
<?php use Fizzday\Booter\Booter; $config = array( 'default' => 'mysql', 'connections' => array( 'mysql' => array( 'driver' => 'mysql', 'host' => 'localhost', 'port' => '3306', 'database' => 'mydb', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ), ); Booter::bootEloquent($config);
-
2.usage
- query builder
<?php use Illuminate\Database\Capsule\Manager as DB; // query builder 调用 DB::table("users")->First();
- model调用
<?php use Illuminate\Database\Eloquent\Model as Model; class UserModel extends Model { protected $table = "prefix_users"; } // eloquent 调用 UserModel::first();
Version selection
v5.3.23
v5.4.36
v5.5.44
v5.6.39
v5.7.28
v5.8.24
these versions alias illuminate/database versions.
composer require v5.4.*
// or
composer require v5.4.36
统计信息
- 总下载量: 277
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-17