likesistemas / eloquent-external
Using eloquent without linking with laravel framework.
Installs: 18 539
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.4
- fakerphp/faker: ^1.9
- illuminate/database: ^8.0 || ^10.0 || ^12.0
- illuminate/events: ^8.0 || ^10.0 || ^12.0
- psr/container: ^1.0 || ^2.0
- symfony/finder: ^3.4 || ^5.0 || ^7.0
Requires (Dev)
- limedeck/phpunit-detailed-printer: ^6.0
- php-parallel-lint/php-parallel-lint: ^1.4
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^9.0
- rector/rector: ^2.1
- symplify/easy-coding-standard: ^12.5
- yoast/phpunit-polyfills: ^2.0
This package is auto-updated.
Last update: 2025-08-30 15:16:25 UTC
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();