I am developing a website using Cakephp and I am uploading an image in the database as a BLOB. Now when I am retrieving the BLOB data from my Cakephp code I am receiving a text "Resource id #245". How can I convert this into base64?
Displaying image code
foreach($foods as $food)
{
echo $food->image;
}
Result in
Resource id #245 (I need this as a base64)
CakePhp Version 3.8