caneara/quest
Quest is a Laravel package for adding a lightweight quest and task system to your app. Define multi-step quests, track user progress, and reward completion through a simple, fluent API with ready-to-use models and migrations.
Install the package with Composer and let Laravel's package discovery register the service provider:
composer require caneara/quest
v4.0.0 introduces configuration options, so the first thing to do after upgrading (or installing fresh) is publish and inspect the config file:
php artisan vendor:publish --tag=quest-config
Then read config/quest.php top to bottom before writing any quest — the defaults chosen by the package are the ones your first workflow will silently inherit.
Where to look first, in order:
config/quest.php — the new surface area in v4, and the cheapest place to change behaviour without touching code.src/ — particularly the base quest/task classes and the service provider, which show what is bound into the container and what is macroable.tests/ directory — the most reliable documentation of expected usage, especially for anything the README glosses over.First use case: pick a multi-step process you already have smeared across a controller or a job — order fulfilment, onboarding, an import pipeline — and model it as a single quest with discrete tasks. Keep the first one to three or four steps so you can see the sequencing and failure behaviour clearly before adding branching or queueing.
One quest per business process, one task per side effect. Quests stay thin and readable; tasks do exactly one thing and are independently testable. When a task grows a second responsibility, split it.
Pass a single payload/context object through the chain rather than reaching for globals or re-querying models. Tasks should read from and write to that context, which keeps them composable and makes assertions in tests trivial.
Queue anything with I/O. A quest that sends mail, hits a third-party API, or writes to several tables should run on a queue. Note that once queued, the payload must be serializable — pass IDs and primitives, not Eloquent models with loaded relations or closures.
Use the config file as your integration seam. The v4 config options are the right place for queue connection, retry/backoff policy, and table or table-prefix naming. Prefer environment-driven config over subclassing internals; it survives package upgrades.
Wire observability at the quest boundary, not inside tasks. Register listeners for the package's lifecycle events and log start/finish/failure with the quest name and payload identifier. This gives you an audit trail and a debugging trail in one place.
Test quests by asserting on the context and on side effects, not on internal call order. For anything nondeterministic, use Bus::fake(), Mail::fake(), and Http::fake() in the usual Laravel way.
php artisan config:cache in deploy, changed config values won't apply until you re-cache. Most "the package is ignoring my settings" reports are this.Bus::fake() plus a manual handle()) to catch it early.updateOrCreate, unique jobs, or an explicit "already done" check in the context.vendor/ or subclassing deep internals — those are exactly what a v5 will move."caneara/quest": "^4.0") and read the changelog before each bump; the jump from 3 to 4 with a one-line changelog suggests this package does not document breaking changes exhaustively.How can I help you explore Laravel packages today?