Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Eloquence Mappable

Eloquence Mappable Laravel Package

kanuuu/eloquence-mappable

Eloquence Mappable adds a trait to Laravel Eloquent models for mapping attributes and relationships to custom array and JSON keys, so you can shape clean API output without exposing database column names.

View on GitHub
Deep Wiki
Context7

kanuuu/eloquence-mappable adds a lightweight mappable trait to Laravel Eloquent models, letting you declaratively translate model attributes into a custom key/value representation. Instead of scattering accessor logic or array-wrangling in controllers, you define a single map that describes how attributes should be exposed—ideal for API resources, exports, and legacy integrations that expect differently named fields.

  • Declare attribute mappings directly on the model via a simple array or method.
  • Convert models to mapped arrays with one call, keeping controllers clean.
  • Supports nested keys and value transformations through closures.
  • Plays nicely with existing Eloquent accessors, casts, and relationships.
  • Zero configuration—just add the trait and define your map.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus