So I'm trying to store some HTML code in the database and then retrieving it througth the API.
Initial HTML:
<img src="https://www.google.se/images/google_80w1ht.gif" alt="Google logo">
Then I store in the DB without any further hassle:
$data = $request->only(['content');
$comment = $this->repo->update($data, $id);
If I go to MySQL Workbench, this is the data stored:
<img src="https://www.google.se/images/google_80wht.gif" alt="Google logo">
However, the moment I retrieve it want want to output the HTML as a JSON parameter, it get's slahed all over the face.
This is the json:
{"title": "<img src=\"https://www.google.se/images/google_80w1ht.gif\" alt=\"Google logo\">"}
I have not applied any transformation nor during insert nor on retrieval.
How can I remove the added extra backslashes? ()