@clarkwinkelmann
I have an issue with session management, Instead of handling session in the file, I have shifted session records to the database,
I introduced a new table named "sessions" with the following fields
return Migration::createTable('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->unsignedInteger('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
$table->integer('last_activity');
});
after this, whenever a session is created a record will created in the following table, I could only see the values of
id, payload,last_activity
values of user_id, ip_address, and_user_agent is always null.
so I tried to debug the file "databasesessionhandler"
`/**
* Get the default payload for the session.
*
* @param string $data
* @return array
*/
protected function getDefaultPayload($data)
{
$payload = [
'payload' => base64_encode($data),
'last_activity' => $this->currentTime(),
];
if (! $this->container) {
return $payload;
}
return tap($payload, function (&$payload) {
$this->addUserInformation($payload)
->addRequestInformation($payload);
});
}`
here it will always return payload only with ['payload', 'last_activiyt'] . when this if (! $this->container) { executes.
have missed anything to configure