не работает ооп

This commit is contained in:
maxim
2021-09-06 10:29:50 +03:00
parent cb504e25bc
commit 56d7afe055
14 changed files with 3059 additions and 603 deletions

View File

@ -45,8 +45,9 @@ class UserCardController extends Controller
public function actionIndex()
{
$id_user = Yii::$app->user->id;
echo $id_user;
// die();
$result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all();
if($result) {
$id = $result[0]['id'];
$dataProvider = new ActiveDataProvider([

View File

@ -50,7 +50,7 @@ class ReportsController extends Controller
$dataProvider->query
->where(['user_card.id_user' => Yii::$app->user->identity->id])
->innerJoin('user_card', 'reports.user_card_id = user_card.id');
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,