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

Quest Laravel Package

mattkingshott/quest

Quest is a lightweight state machine for Laravel. Define the states a model can occupy and the transitions allowed between them, then move models through your workflow with guard checks and events, keeping status logic expressive and out of your controllers.

View on GitHub
Deep Wiki
Context7

A package that provides pseudo fuzzy-searching to Laravel database queries.

Frequently asked questions about Quest
How do I install Quest in a Laravel application?
Install it with Composer using composer require mattkingshott/quest, then publish the package config and run migrations if your workflow persists state to the database. Quest registers its service provider through Laravel package auto-discovery, so a standard app needs no manual entry in config/app.php. Check that the version constraint Composer resolves matches the Laravel release you are actually running before you commit the lock file.
Which PHP and Laravel versions does Quest 4.x support?
The 4.0.0 release notes do not state the compatibility matrix, so read the require block in the package composer.json before committing. Verify the PHP constraint, the illuminate/support constraint, and database driver support, since JSON column handling differs between MySQL and Postgres. Test against your exact Laravel minor version rather than assuming 4.x will resolve cleanly.
What is breaking between Quest 3.x and 4.x, and is there an upgrade guide?
Version 4.0.0 is a major bump, but the changelog documents only one additive change around configuration options, so the breaking surface is not clearly described. The release came through a single pull request, so read that diff directly to see what changed in code and config. Until that is confirmed, treat 4.x as unverified and keep 3.x pinned as your known-good baseline.
How do I define states and transitions for a model in Quest?
Quest lets you declare the states a model can occupy and the transitions allowed between them, usually by applying the package trait or contract to the model. Each transition can carry guard checks that refuse the move when a condition fails, which keeps authorization and business rules next to the transition definition. Put the definition in a dedicated class or method instead of scattering status logic across controllers.
How do I safely publish and merge the Quest config file?
Run php artisan vendor:publish into a scratch directory first, then diff the generated config/quest.php against the copy committed in your repository key by key. New top-level keys usually merge in with defaults, but renamed or restructured keys will silently fall back or throw when your published file is stale. Never overwrite a committed config file blindly during a major upgrade, and confirm whether a force option exists before using it.
Does Quest ship database migrations, and are they reversible?
If quest state is persisted, the package ships migrations you publish and run against your database. Test them in a disposable environment loaded with a production-shaped snapshot before touching a real database. Confirm the down methods are implemented, because a non-reversible migration raises the cost of a failed upgrade considerably.
How do I listen for events when a model changes state?
Quest dispatches events around transitions, so register listeners in your EventServiceProvider or rely on Laravel event discovery to react to a completed transition. Use them for side effects such as notifications, audit records, or queued jobs rather than embedding that logic inside the transition itself. Add a contract test that asserts the event still fires for a known fixture model after any upgrade.
Does Quest work in a multi-tenant or event-sourced Laravel app?
Quest is an additive domain concern rather than infrastructure, so a standard monolith or modular monolith is a comfortable fit and it stays out of the request hot path unless you put it there. Multi-tenant and event-sourced setups need validation, particularly around how quest state is keyed per tenant and whether the model or database connection is configurable. Confirm tenant scoping before assuming the package is safe in that architecture.
What are the alternatives to Quest for state machines in Laravel?
If you only need a status column, native PHP enums with hand-written transition methods may be enough and add no dependency. A dedicated state machine package earns its place when you need transition guards, events, and a clear record of which moves are legal. Compare Quest against other Laravel state machine packages on guard support, event dispatching, and how actively the release line is maintained.
Is Quest still maintained, and how should I test it before upgrading?
The 4.0.0 headline change came from a first-time contributor, which is a bus-factor data point worth noting but not a red flag on its own. Check CI status and test coverage on the 4.0.0 tag, then run your existing suite plus a small contract test asserting a known transition still completes for a fixture model. Branch, bump to ^4.0, and validate behaviour before merging to mainline.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource