Closed huglester closed 9 years ago
Hello,
Since I am using this package outside the Laravel, I have registered Eloquent wrong.
I missed this step: $capsule->setEventDispatcher(new Dispatcher(new Container));
Full connection code:
$capsule = new Capsule;
$capsule->addConnection([
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'test',
'username' => 'homestead',
'password' => 'secret',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
]);
$capsule->setEventDispatcher(new Dispatcher(new Container));
$capsule->setAsGlobal();
$capsule->bootEloquent();
Hello,
I would like to note, that I am using this package outside Laravel. Maybe because of this, there can be issues?
I seem not to be able to create childs:
Full error:
Do you have any ideas?
Thank you