r-quintin / extended-relations
1.1.0
2023-11-05 11:03 UTC
Requires
- php: >=8.0.0
README
The ExtendedRelations package for Laravel made relations for you and loads it automatically in array serialization.
Installation
$ composer require r-quintin/extended-relations
Simple usage
use RQuintin\ExtendedRelations\ExtendedModel; class Driver extends ExtendedModel { /** * Relations on this model * * @var string|string[]|null */ protected string|array|null $relationships = ['vehicles']; /** * Loaded relations in serialization * * @var string|array|null */ protected string|array|null $loads = ['vehicles']; }
Documentation
For setup, usage guidance, and all other docs - please consult the Project Wiki.
License
ExtendedRelations is open-sourced software licensed under the MIT license.