承接 likesistemas/eloquent-external 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-03-25