Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Laravel
  3. Sofa/Eloquence

Sofa/Eloquence

MITPHPv6.0

A collection of easy and flexible extensions for Laravel's Eloquent ORM, adding searchable, validable, mappable, and other capabilities.

Visit WebsiteGitHubGitHub
1.1k stars133 forks0 contributors

What is Sofa/Eloquence?

Sofa/Eloquence is a PHP package that provides a collection of extensions for Laravel's Eloquent ORM. It adds advanced features like full-text search, self-validation, attribute mapping, and meta attributes to Eloquent models, solving common database interaction challenges in Laravel applications.

Target Audience

Laravel developers working with Eloquent ORM who need enhanced model capabilities such as search, validation, or flexible attribute handling without reinventing the wheel.

Value Proposition

Developers choose Sofa/Eloquence for its modular, easy-to-integrate extensions that extend Eloquent's core functionality with minimal setup, offering a clean, tested, and PSR-2 compliant solution for complex database operations.

Overview

Extensions for the Eloquent ORM

Use Cases

Best For

  • Adding full-text search capabilities to Eloquent models across related tables
  • Implementing self-validating models with custom validation rules in Laravel
  • Mapping model attributes to database fields or related models dynamically
  • Managing meta attributes as key-value pairs on Eloquent models
  • Setting up flexible attribute mutators with pipe-based transformations
  • Extending Eloquent ORM with modular, plug-and-play features

Not Ideal For

  • Projects relying solely on Laravel's native validation and search without needing third-party extensions
  • Teams using external search engines like Elasticsearch or Algolia who prefer dedicated integrations over database-level queries
  • Applications with strict performance budgets where adding multiple ORM traits could introduce overhead
  • Developers who prefer fully integrated solutions with comprehensive, single-source documentation

Pros & Cons

Pros

Modular Flexibility

Allows installing individual extensions like Metable or Validable via Composer, keeping projects lightweight and focused on specific needs, as shown in the README's installation options.

Easy Full-Text Search

Provides a simple, query-based full-text search across related models with the Searchable extension, eliminating complex manual SQL queries for basic search needs.

Self-Validating Models

Enables models to validate their own data using built-in rules via the Validable trait, reducing boilerplate code in controllers and improving code organization.

Flexible Attribute Handling

Offers Mappable and Metable extensions for dynamic attribute mapping and key-value meta data management, making it easier to handle complex database schemas.

Cons

Documentation Fragmentation

Documentation is split across multiple repositories and wikis, as noted in the README links, which can make it harder to find cohesive guidance and troubleshoot issues.

Setup Complexity

Each extension requires separate installation and configuration, adding overhead compared to a single, integrated package, especially when combining multiple traits.

Ecosystem Limitations

As a third-party package, it may have slower updates or less community support than core Laravel features, potentially leading to compatibility gaps with newer Laravel versions.

Frequently Asked Questions

Quick Stats

Stars1,082
Forks133
Contributors0
Open Issues14
Last commit1 year ago
CreatedSince 2015

Tags

#laravel#eloquent-orm#model-validation#php-orm#fulltext-search

Built With

E
Eloquent ORM
P
PHP
L
Laravel

Links & Resources

Website

Included in

Laravel13.0k
Auto-fetched 9 hours ago

Related Projects

LiveWireLiveWire

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

Stars23,516
Forks1,735
Last commit2 days ago
Debug BarDebug Bar

Debugbar for Laravel (Integrates PHP Debug Bar)

Stars19,214
Forks1,604
Last commit10 days ago
IDE HelperIDE Helper

IDE Helper for Laravel

Stars14,903
Forks1,189
Last commit11 days ago
Intervention ImageIntervention Image

PHP Image Processing

Stars14,337
Forks1,490
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub