Skip to content

mahmoudmohamedramadan/easy-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy Model

Easy Model

License Latest Version on Packagist Total Downloads


Overview

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 and Eloquent Builder.
  • 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.
  • Streamline Batch Updates:

    • Effortlessly perform multiple updates using concise methods, consult update.md.
  • And more...

Installation

Install the package by using Composer:

composer require ramadan/easy-model

Usage

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.

Credits

Support me

License

The MIT License (MIT).