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
Laravel Computed Properties

Laravel Computed Properties Laravel Package

n7olkachev/laravel-computed-properties

Add computed properties to your Laravel Eloquent models, calculated on the fly like accessors but excluded from the database. Keep models lean, reuse derived values across queries and serialization, and write less boilerplate.

View on GitHub
Deep Wiki
Context7

Laravel Computed Properties lets you define computed attributes on Eloquent models using simple, attribute-based syntax. Instead of manually appending accessors, you annotate methods with #[Computed] and the package registers them automatically, so the resulting values behave like regular model attributes—serialized in arrays and JSON alongside your database columns.

  • Attribute-driven — mark methods with #[Computed]; no manual $appends wiring
  • Automatic inclusion in toArray() and JSON responses
  • Lazy evaluation — values are computed only when accessed
  • Works with Eloquent models, preserving full accessor-like behaviour
  • Clean models — keep derived logic out of database schema
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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource