I am new in laravel. How to convert laravel object into js array. my coce is below..
$customer = new Customer();
$result = $customer->where('client_state','like', '%'.$statename.'%')->get(array('client_state'));
echo $result;
result is...
[{"client_state":"Gujarat1"},{"client_state":"Gujarat"}]
but i need like this..
["Gujarat1","Gujarat"]
How it is possible?