I wrote query that returns result based on debug field that is set on 0 or 1. On the given result I have some strings that include prefix dev_ that I want to remove from the results. How can I do that?
This are my results..
{
"success": true,
"data": [
{
"serviceUrl": "dev_url",
"serviceUsername": "dev_username",
"servicePassword": "dev_password"
}
],
"message": null
}
And this is the code..
if ($debug = true) {
$query = $this->getClientRepository()
->createQueryBuilder('c')
->select('c.serviceUrl', 'c.serviceUsername', 'c.servicePassword')
->where('c.debug = :debug')
->setParameter('debug', $debug);
}else {
$query = $this->getClientRepository()
->createQueryBuilder('c')
->select('c.SecondServiceUrl', 'c.SecondServiceUsername', 'c.SecondServicePassword');
}
return $query->getQuery()->getResult();