

'session' => [
// this is the name of the session cookie used for login on the frontend
'class'=>'yii\web\DbSession',
'sessionTable'=>"{{%session}}",
'name' => 'advanced-frontend',
],再某个数据中中创建session表.
数据库结构:

控制器:

插入的数据.
