public function buyers() { // Eloquent $buyer_objs = Buyer::active(); $buyers = array(); foreach ($buyer_objs as $key => $buyer) { $buyers[] = array('id' => $buyer['id'], 'name' => ucfirst(strtolower($buyer['name']))); } return Response::json($buyers); }