add filters, refactoring
This commit is contained in:
@ -40,7 +40,7 @@ class AnswerSearch extends Answer
|
||||
*/
|
||||
public function search($params)
|
||||
{
|
||||
$query = Answer::find();
|
||||
$query = Answer::find()->with('question');
|
||||
|
||||
// add conditions that should always apply here
|
||||
|
||||
|
@ -40,7 +40,7 @@ class QuestionSearch extends Question
|
||||
*/
|
||||
public function search($params)
|
||||
{
|
||||
$query = Question::find();
|
||||
$query = Question::find()->with(['questionnaire', 'questionType']);
|
||||
|
||||
// add conditions that should always apply here
|
||||
|
||||
|
@ -40,7 +40,7 @@ class QuestionnaireSearch extends Questionnaire
|
||||
*/
|
||||
public function search($params)
|
||||
{
|
||||
$query = Questionnaire::find();
|
||||
$query = Questionnaire::find()->with('category');
|
||||
|
||||
// add conditions that should always apply here
|
||||
|
||||
|
@ -41,7 +41,7 @@ class UserQuestionnaireSearch extends UserQuestionnaire
|
||||
*/
|
||||
public function search($params)
|
||||
{
|
||||
$query = UserQuestionnaire::find();
|
||||
$query = UserQuestionnaire::find()->with('questionnaire')->joinWith('user');
|
||||
|
||||
// add conditions that should always apply here
|
||||
|
||||
|
@ -41,7 +41,7 @@ class UserResponseSearch extends UserResponse
|
||||
*/
|
||||
public function search($params)
|
||||
{
|
||||
$query = UserResponse::find();
|
||||
$query = UserResponse::find()->with('user');
|
||||
|
||||
// add conditions that should always apply here
|
||||
|
||||
|
Reference in New Issue
Block a user