我在这个主题上看过other questions,但我无法在代码中发现错误。
$cFilters = array() of answer_ids;
$respondents = Auth::user()->account->respondents()
->whereHas('responses', function($q) use($cFilters) {
foreach($cFilters as $answer_id) {
$q->where('responses.answer_id', $answer_id);
}
})->get();
答案 0 :(得分:5)
向智者说话。确保您没有将jQuery selector
作为值传递到表单数据中。
违规行是:
var action = $('select[name="bulk_action"]')
应该是:
var action = $('select[name="bulk_action"]').val()