{
"Status": true,
"Message": "Roles retrieved successfully",
"Data": [
{
"RoleID": 1,
"Role": "Super Admin",
"IsPredefined": "1",
"IsActive" : "1",
}
]
}
I am fetching above results in json format. I am using below query to fetch the data from MySql database.
I am using Model and my code is: RoleModel::all()
I am using PHP-Laravel 5.3
Is there any way to make the resultset like below.
{
"Status": true,
"Message": "Roles retrieved successfully",
"Data": [
{
"RoleID": 1,
"Role": "Super Admin",
"IsPredefined": true,
"IsActive" : true,
}
]
}
Issue is in IsPredefined. I want to retrieve it Boolean type. In database it is of type bit