SHARE
TWEET

Untitled

a guest Dec 8th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $userSubQuery = UserProject::find()->select('project_id')->where(['user_id' => Yii::$app->user->id])
  2.  
  3. $model = Project::find()
  4.     ->where(['id' => $id]) // view action, GET-ből jön a $id, listázónál csak ez a sor a különbség
  5.     ->andWhere(['!=','status', Project::STATUS_DELETED]) // Töröltet ne találjon meg
  6.     ->andWhere(['id' => $userSubQuery])
  7.     ->one();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top