This product was not featured by Product Hunt yet.
It will not be visible on their landing page and won't be ranked (cannot win product of the day regardless of upvotes).

Product Thumbnail

Easy Model

A Laravel package for enjoyably managing database queries

Open Source
GitHub
Database
Visit WebsiteSee on Product HuntGithub

Hunted byMahmoud RamadanMahmoud Ramadan

🔥 Easy Model v2.1.0 is here! Simplify Laravel Eloquent with smarter filtering, sorting, relationships, eager loading, JSON and date filters, soft deletes, mass insert, and upsert support. Built to reduce repetitive code, improve flexibility, and keep your models clean and maintainable.

Top comment

🚀 Easy Model v2.1.0 is here!

A major update bringing more powerful querying, filtering, relationships, and database operations to Laravel Eloquent.

🔎 Request-Driven Queries

Build queries directly from request parameters with controlled filters, sorts, includes, and searches:

Product::fromRequest()
    ->allowedFilters(['status', 'category_id'])
    ->allowedSorts(['name', 'created_at'])
    ->allowedIncludes(['category'])
    ->allowedSearch(['name', 'description'])
    ->get();

⚙️ Conditional Query Chaining

Conditionally add query logic with `when()` and `unless()`:

Product::when($active, fn ($query) => $query->where('active', true))
    ->unless($admin, fn ($query) => $query->where('public', true))
    ->get();

🔗 Eager Loading & Relationships

Add relationships and relationship counts dynamically:

Product::addWith('category')
    ->addWithCount('reviews')
    ->get();

Keyword searches now also support dotted relationship columns:

Product::addKeywordSearch(['name', 'category.name'])->get();

🎯 Select, Pagination & SQL Inspection

Control selected columns, paginate results, and inspect generated SQL:

Product::addSelect(['id', 'name'])
    ->paginate(20);

Product::toSql();

Supports `paginate()`, `simplePaginate()`, and `cursorPaginate()`.

📅 Date, Period & JSON Filtering

Add powerful date, period, and JSON conditions:

Order::addWhereDate('created_at', '2026-09-01')
    ->addWherePeriod('created_at', $start, $end)
    ->addWhereJsonContains('options', ['featured' => true])
    ->get();

🗑️ Full Soft Delete Support

Work with trashed models and restore or permanently delete them:

User::onlyTrashed()->get();

$user->restore();

$user->forceDelete();

⚡ Mass Insert & Upsert

Perform efficient bulk writes while optionally supporting model events:

Product::performInsert($products);

Product::performUpsert($products, ['sku']);

Product::usingModelEvents();

🔄 Smarter Relationship Ordering

Relationship joins in `addOrderBy()` now support table aliasing when multiple relationships use the same table.

🧪 Better Testing

v2.1.0 introduces an Orchestra Testbench and PHPUnit test suite to improve reliability and maintainability.

Easy Model v2.1.0 gives Laravel developers more control while reducing repetitive Eloquent query code.

Try it, explore the new features, and share your feedback!

Comment highlights

No comment highlights available yet. Please check back later!

About Easy Model on Product Hunt

A Laravel package for enjoyably managing database queries

Easy Model was submitted on Product Hunt and earned 3 upvotes and 1 comments, placing #102 on the daily leaderboard. 🔥 Easy Model v2.1.0 is here! Simplify Laravel Eloquent with smarter filtering, sorting, relationships, eager loading, JSON and date filters, soft deletes, mass insert, and upsert support. Built to reduce repetitive code, improve flexibility, and keep your models clean and maintainable.

Easy Model was featured in Open Source (68.8k followers), GitHub (41.4k followers) and Database (2.2k followers) on Product Hunt. Together, these topics include over 46.6k products, making this a competitive space to launch in.

Who hunted Easy Model?

Easy Model was hunted by Mahmoud Ramadan. A “hunter” on Product Hunt is the community member who submits a product to the platform — uploading the images, the link, and tagging the makers behind it. Hunters typically write the first comment explaining why a product is worth attention, and their followers are notified the moment they post. Around 79% of featured launches on Product Hunt are self-hunted by their makers, but a well-known hunter still acts as a signal of quality to the rest of the community. See the full all-time top hunters leaderboard to discover who is shaping the Product Hunt ecosystem.

Want to see how Easy Model stacked up against nearby launches in real time? Check out the live launch dashboard for upvote speed charts, proximity comparisons, and more analytics.