|
- <?php
-
- namespace common\repositories;
-
- use common\models\User;
- use common\models\UserProducer;
-
- class UserProducerRepository
- {
- public function getBy($idUser, $active = 1, $bookmark = 1)
- {
- return UserProducer::find()
- ->with(['producer'])
- ->where([
- 'id_user' => $idUser,
- 'active' => $active,
- 'bookmark' => $bookmark
- ])
- ->all();
- }
- }
|