не работает ооп
This commit is contained in:
@ -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([
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user