Yii::$app->user->identity->getId()
public function actionIndex()
{
$q = Yii::$app->request->get('id_cart');
if ($q){
$query = Clients::find()->where('id_cart=:id', [':id' => $q])->one();
return $this->render('index', compact('query'));
}else{
Yii::$app->session->setFlash('error', 'Ошибка... Попробуйте еще раз...');
return $this->refresh();
}
}
</>
</>
https://regex101.com/r/i0yA7y/1