Why this package?
I am focused on simplifying the syntax to match my vision, making it easier for you to perform tasks that typically require more lines of code or effort in Laravel. I am also addressing issues that Laravel still faces. The package is actively maintained, and I regularly review closed PRs in Laravel to find methods to help achieve this.
What makes this package featured?
-
Accelerated Query Performance:
- Significantly improved query performance compared to native Laravel.
-
Straightforward and Unified Syntax:
- Provides a unified, consistent syntax for
Query Builder
andEloquent Builder
.
- Provides a unified, consistent syntax for
-
Resolved Ambiguous Exception:
- Fixes the ambiguous exception that arises when using the same column in both models and their relationships during ordering.
-
Simplified Relationship Ordering:
- Easily order results by model relationships (
HasOne
,HasMany
,BelongsTo
,BelongsToMany
) without referring to manual joins. Check out Order Results to learn more.
- Easily order results by model relationships (
-
Streamline Batch Updates:
- Effortlessly perform multiple updates using concise methods, consult update.md.
-
And more...
Install the package by using Composer:
composer require ramadan/easy-model
Warning
Do not use both traits together, as doing so may lead to unexpected output. However, if you do, the most priority will be given to the Searchable trait.
For comprehensive examples and in-depth usage guidelines, check out search.md and update.md.
The MIT License (MIT).