This is the session migration scheme:
Schema::create('sessions', function($table)
{
$table->string('id')->unique();
$table->text('payload');
$table->integer('last_activity');
$table->integer('user_id')->unsigned();
});
You can add any column that you like on it, Laravel will not mind.
Or you can create a new migration and add it to this table.
$table->integer('user_id')->unsigned();
You can create a model for it:
class SessionModel extends Eloquent {
}
And do whatever you need:
$session = SessionModel::find(Session::getId());
$session->user_id = 1;
$session->save();
, Laravel , , , Laravel, .