I'm using postman to test my APIs and i get the following response
{
"Message": "Dinks loaded successfully.",
"Status": true,
"InnerData": [
{
"id": 1,
"place_id": "25",
"drink_type": "1",
"drink_amount": "2",
"device_id": "1",
"created_at": "2018-03-09 14:22:27",
"updated_at": "2018-03-09 14:22:27"
}
]
}
in my DB the drink_type, place_id, drink_amount, device_id are all integers but i receive them as string , what is wrong with them ?
here is my code used to return this data
public function loadDrinks(Request $request){
$place_id = $request->place_id;
$device_id = $request->device_id;
$drinks = \App\DrinksOrdered::where(['place_id' => $place_id, 'device_id' => $device_id])->get();
$resp = new \App\Http\Helpers\ServiceResponse;
$resp->Message = "Drinks loaded successfully.";
$resp->Status = true;
$resp->InnerData = $drinks;
return response()->json($resp, 200);
}