I am trying to connect my sessions to a database with the PHP slim framework but I cant seem to connect. I am using the following middleware: https://github.com/yusukezzz/slim-session-manager
But the example shows the connection like:
$manager->setDbConnection(Eloquent::getConnection());
I am not using Eloquent. I have tried:
$manager->setDbConnection(mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE));
But get the error:
Argument 1 passed to Illuminate\Session\DatabaseSessionHandler::__construct() must be an instance of Illuminate\Database\Connection, instance of mysqli given
How can I pass an instance of Illuminate\Database\Connection ?