Download the PHP package plank/larelations without Composer
On this page you can find all versions of the php package plank/larelations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download plank/larelations
More information about plank/larelations
Files in plank/larelations
Package larelations
Short Description Extract the relations from a given Laravel model
License MIT
Homepage https://github.com/plank/larelations
Informations about the package larelations
Larelations
This package is designed to extract Eloquent Relations from a given Model using reflection and return type checking.
Installation
You can install the package via composer:
Usage
Given an instance of an Eloquent Model or its class-string, this package will extract all relations defined on the model, and return them in a Collection of RelationInstance
items.
Each RelationInstance
has the ReflectionMethod ($method
) where the relation was defined, as well as an instance of the Relation
($relation). There are some helper methods on the RelationInstance
that allow you to classify the type relation it is (ie. child, parent, pivotted, etc).
Testing
Contributing
Please see CONTRIBUTING for details.
Credits
- Kurt Friars
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Security Vulnerabilities
If you discover a security vulnerability within Larelations, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
All versions of larelations with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^9.0