Currently I am having success with the following query:
if (isset($data->action_needed_status) && $data->action_needed_status != '') {
$query->where('status', 'like', '%'.$data->action_needed_status.'%');
$query_count->where('status', 'like', '%'.$data->action_needed_status.'%');
The complaint was this:
Since status is an ENUM field you know that any valid status value passed should match exactly. There shouldn't be a need for using LIKE in the where statements.
What would be the best way to have same result without using LIKE?