Skip to content

Fix listener and custom driver examples in the README - #27

Merged
stevebauman merged 1 commit into
masterfrom
docs/fix-listener-and-driver-examples
Oct 24, 2026
Merged

stevebauman merged 1 commit into
masterfrom
docs/fix-listener-and-driver-examples

Conversation

@stevebauman

Copy link
Copy Markdown
Member

The listener example assigns schedulable_type instead of comparing it, then tries to access a schedulable property that doesn't exist on the event. Use a strict comparison and access the parent model through $event->schedule->schedulable.

The custom driver example also calls a nonexistent Schedule::driver() method. Replace it with Cadence::register() and the correct import.

Validated the snippets with PHP syntax checks and ran the existing schedule and command tests (65 passing).

Fixes #21.

@stevebauman
stevebauman merged commit 76b5317 into master Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the listener and custom driver examples in the README

1 participant