likesistemas/eloquent-external
最新稳定版本:v2.1.1
Composer 安装命令:
composer require likesistemas/eloquent-external
包简介
Using eloquent without linking with laravel framework.
README 文档
README
Installation
composer require likesistemas/eloquent-external
How to use
Using class ConfigBean
use Illuminate\Container\Container; use Like\Database\Config; use Like\Database\ConfigBean; use Like\Database\Eloquent; $config = new ConfigBean( 'host', 'user', 'password', 'db_name' ); $config->setFactoryFolder(__DIR__ . "/./factories/"); # Folder where all the Eloquent factories are. $config->addFakerProvider(ProdutoProvider::class); # Optional. Use to add new providers to Faker. Note: you can add as many as you like. # If you are configuring the settings in the same file that will start, you can pass the config by parameter. Eloquent::init($config); # Or set using `illuminate\container` and run init without parameter. Container::getInstance()->instance(Config::class, $config); # Then call `init` wherever you think is best, without having to pass parameters. Eloquent::init();
统计信息
- 总下载量: 20.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-03-25