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 Model Status Laravel Package

open-southeners/laravel-model-status

Lightweight Laravel model status handling using native PHP enums—no extra tables needed. Define a status enum, attach it via a PHP attribute, and use a trait for helpers like setStatus, setStatusWhen, hasStatus, and optional status events.

View on GitHub
Deep Wiki
Context7
3.1.0

Added

  • Laravel 13 support
3.0.0

Added

  • Laravel 12 support

Removed

  • Laravel 9 and 10 support
2.1.0

Added

  • Laravel 11 support
2.0.4

Fixed

  • Fully qualify columns on statuses query scopes
2.0.3

Fixed

  • Models creating event stopping propagation of other events
2.0.2

Added

  • Laravel 10 support
2.0.1

Fixed

  • StatusEnumCaseName using $defaultStatus protected static property
2.0.0

Added

  • Status swapping & swapped events (observable) to Eloquent models that uses the HasStatuses trait: swappingStatusName, swappedStatusName. Do not confuse with saving, saved Eloquent events, these are triggered from setStatus & setStatusWhen functions, so may you always use these

Changed

  • setStatus and setStatusWhen functions doesn't return self, instead they return always true when not saving, true or false otherwise

Fixed

  • StatusEnumCaseName attribute cast now returns defaultStatus if defined on the trait, null otherwise
1.2.1

Fixed

  • BackedEnum::tryFrom throwing deprecation warnings when argument is null
1.2.0

Added

  • ofStatuses query scope to HasStatuses trait
1.1.0

Added

  • Status attribute cast for toArray / toJson Laravel model methods

Removed

  • open-southeners/laravel-helpers dependency (not gonna use UnitEnums)

Fixed

  • Inconsistency when getting status enum as attribute
1.0.1

Fixed

  • Wrong version to dependency open-southeners/laravel-helpers
1.0.0

Added

  • Package published on Packagist (composer)
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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels