Download the PHP package musamba/red-thread without Composer
On this page you can find all versions of the php package musamba/red-thread. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download musamba/red-thread
More information about musamba/red-thread
Files in musamba/red-thread
Package red-thread
Short Description Red Thread is a laravel package that helps you easily list all relationships within a given model.
License MIT
Homepage https://github.com/Musamba24/red-thread
Informations about the package red-thread
RedThread
RedThread is a simple package that allows you to list your Laravel models relationships.
The two people connected by the red thread are destined lovers, regardless of place, time, or circumstances. This magical cord may stretch or tangle, but never break.
Table of Contents
- Installation
- Usage
- Testing
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
Installation
You can install the package via composer:
You can publish the config file with:
Usage
You simply need to use the HasRedThreads
trait in your model and call the relationships
method.
Here is an example:
Calling the provided relationships()
static method on a model instance:
An array containing all the relationships will be returned.
If the check_for_attribute
configuration key is set to false
, the package will check the return type of the method,
so having a situation like this:
The same array as above will be returned.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Feel free to contribute to this package and help me to improve it. You can contribute by opening an issue or a pull request.
Roadmap
- [ ] Add artisan command to list relationships via CLI.
- [ ] Add related model class and foreign key information.
Security Vulnerabilities
If you discover a security vulnerability within RedThread, please open an issue.
Credits
- Andrea Musmarra
- All Contributors
License
The MIT License (MIT). Please see License File for more information.