From 6bfdcd9fac15c3282d4af81641f45bb69496d180 Mon Sep 17 00:00:00 2001 From: Franky Braem Date: Sun, 31 Jan 2016 14:46:38 +0100 Subject: [PATCH] A note about Illuminate Database component When using Illuminate without Laravel, it's important to set the event dispatcher (which is optional) when using Stapler. --- docs/troubleshooting.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index c3f86b3..0cca5e4 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -20,4 +20,12 @@ public static function boot() static::bootStapler(); } -``` \ No newline at end of file +``` + +When using the [Illuminate Database component](https://github.com/illuminate/database) without Laravel, make sure the event dispatcher is set! +``` +// Set the event dispatcher +use Illuminate\Events\Dispatcher; +use Illuminate\Container\Container; +$capsule->setEventDispatcher(new Dispatcher(new Container)); +```