Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

UserProducerRepository.php 445B

123456789101112131415161718192021
  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. }