<?php namespace App\Http\Controllers; use Illuminate\Http\Request; class CurrencyController extends Controller { public function list() { $CURRENCY_DATA = array( array("cc" => "IDR", "symbol" => "Rp", "name" => "Indonesian rupiah"), array("cc" => "USD", "symbol" => "US$", "name" => "United States dollar"), ); return response()->json(['status'=>'success','code'=>200,'data'=>$CURRENCY_DATA, 'totalRecord'=>count($CURRENCY_DATA)], 200); } }