Download the PHP package symbiotic/eloquent without Composer
On this page you can find all versions of the php package symbiotic/eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symbiotic/eloquent
More information about symbiotic/eloquent
Files in symbiotic/eloquent
Package eloquent
Short Description Inherited model and encapsulated connection manager to avoid conflicts with Laravel
License BSD-3-Clause
Informations about the package eloquent
Symbiotic (Laravel Eloquent)
README.RU.md РУССКОЕ ОПИСАНИЕ
Eloquent wrapper package (laravel/database
) for parallel independent work with Laravel models of separate applications.
Installation
Description
Configuration conflicts occur when third-party functionality using the laravel/database
package works together connections.
The current package inherits the model and manager class, which allows you to work in parallel with Laravel to several
independent libraries with their own connection settings and use Laravel models.
It is also possible to configure connections by basic namespaces,
this makes it possible for each packet to specify its own connection.
Usage
Manager initialization
When you initialize the Laravel base model \Illuminate\Database\Eloquent\Model::class
you will globally overwrite the manager
connections in all descendants of the model,
so be sure to check out your connection manager after your functionality is finished.
You can use the inherited model \Symbiotic\Database\Eloquent\SymbioticModel::class
as a base,
it eliminates all configuration conflicts.
It is recommended to inherit from the SymbioticModel class:
Basic Methods
Configuring connections depending on model namespaces
Sometimes some independent functionality needs to be placed in a separate database, To do this, you can use the connection configuration by namespaces.
Multiple individual managers can work collaboratively and cross-functionally
Getting SchemaBuilder for migrations:
Complete documentation on using models and setting up connections