Weave Code
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.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony