/** * * @param string $queue * @param boolean $status * @param string $order_by * @param string $sort * @return object */ public function searchParticipants($queue, $order_by = 'name', $sort = 'asc') { $order_by = null !== Input::get('field') ? Input::get('field') : $order_by; $sort = null !== Input::get('sort') ? Input::get('sort') : $sort; return Participant::search($queue)->orderBy($order_by, $sort)->get(); }