Registry / orm / spatie-laravel-model-states

spatie-laravel-model-states

JSON →
library2.14.1phppackagistunverified

State support for Eloquent models

composer require spatie/laravel-model-states
INSTALL
IMPORT
SIG · SPATIE-LARAVEL-MOD
S
spatie-laravel-model-states
ormphpv2.14.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HasStates
use Spatie\ModelStates\HasStates;

Add state support to an Eloquent model using the HasStates trait.

use Spatie\ModelStates\HasStates; class Order extends Model { use HasStates; public function state(): string { return $this->state; } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.14.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
45 hits · last 30 days
node
42
Resources
spatie-laravel-model-states — pip install spatie-laravel-model-states · libregistry