webbingbrasil/eloquent-sti
Eloquent STI
Eloquent STI brings a Single Table Inheritance capabilities to Eloquent.
Installation
composer require "webbingbrasil/eloquent-sti=1.0.0"
Usage
Use the CanBeInherited trait in any entity to get STI capabilities in childs
use WebbingBrasil\EloquentSTI\CanBeInherited;
class User extends Model
{
use CanBeInherited;
}
Now just extend the parent model with any child models
class Admin extends User
{
}
class Manager extends User
{
}
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
641,106,524
9,700
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
418,291,778
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.0 | >=5.6.4| | >=5.3 | MIT |