public function searchPersonAction($params) { try { $result = \App\Person::search(urldecode($params['name']) . "%"); echo json_encode($result); } catch (\Exception $e) { getSystem()->getRender()->error(500, 'Could not perform search', $e); } }