You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
445B

  1. <?php
  2. namespace common\repositories;
  3. use common\models\User;
  4. use common\models\UserProducer;
  5. class UserProducerRepository
  6. {
  7. public function getBy($idUser, $active = 1, $bookmark = 1)
  8. {
  9. return UserProducer::find()
  10. ->with(['producer'])
  11. ->where([
  12. 'id_user' => $idUser,
  13. 'active' => $active,
  14. 'bookmark' => $bookmark
  15. ])
  16. ->all();
  17. }
  18. }