Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dashboard = $this->Users->find()->matching('Stores', function($q){
- return $q->where(['Stores.user_id'=>$this->Auth->user('id')]);
- });
- $dashboard1 = $this->Users->get($this->Auth->user('id'),[
- 'select'=>['Users.fullname','Users.photo','Users.photo_dir','Users.bio','Users.email','Stores.beat_path','Stores.beat_name','Genres.genre'],
- 'contain'=>['Stores','Genres']
- ]);
- // ['condition'=>['Users.id'=>$this->Auth->user('id')]]->select(['Users.fullname','Users.photo','Users.photo_dir','Users.bio','Users.email'])->contain(['Genres','Stores']);
- debug($dashboard->all());
Add Comment
Please, Sign In to add comment