Package
Kirschbaum Development Eloquent Power Joins
The Laravel magic applied to joins.
Overview
What Kirschbaum Development Eloquent Power Joins does
Eloquent Power Joins enhances the readability and simplicity of writing joins in Laravel by utilizing Laravel's relationship methods.
The package addresses a common frustration with writing joins in Laravel. While Eloquent simplifies many aspects of database interaction, joins often require manual SQL that can be cumbersome and verbose. Eloquent Power Joins provides a solution by allowing developers to use defined relationships to perform joins, streamlining the process and reducing code complexity.
Using Eloquent Power Joins, developers can replace traditional join syntax with the method joinRelationship, making use of existing Eloquent relationships. This approach not only makes the code more readable but also encapsulates the join logic within the relationships themselves, preventing unwanted exposure of implementation details.
In addition to simplifying typical joins, the package handles more complex scenarios like polymorphic relationships, soft deletes, and model scopes. It also enables querying the existence of relationships and sorting by related columns or aggregations, all through intuitive methods like powerJoinHas and orderByPowerJoins.
Eloquent Power Joins fits seamlessly into the Laravel ecosystem by enhancing Eloquent's capabilities without altering runtime behavior, making it particularly useful for developers looking to maintain clean, maintainable codebases.
This overview was generated by AI from the package README and may not reflect the latest release.
Read the full README →