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

What makes this package featured?

  • Accelerated Query Performance:

    • Significantly improved query performance compared to native Laravel (fig. 1.).
  • 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 (fig. 3.).
  • Streamline Batch Updates:

    • Effortlessly perform multiple updates using concise methods. For detailed information, consult update.md.

The package was considerably FASTER than the Laravel query when tested on over 1k records (fig. 2.). 🥵

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.

Search Features

Check out search.md for comprehensive examples and in-depth usage guidelines.

Update Features

Check out update.md for comprehensive examples and in-depth usage guidelines.

Credits

Support me

License

The MIT License (MIT).