Skip to content

Tag: php

Selecting data from array, based on day of the week using PHP

I have the following code, taken from another question: It is working as is, but i want to be able to output the schedule for the current day, for example: How can i do this? I understand that date(‘D’) outputs the current day (Thu), but i have not been able to make it work to extract the desired …

Insert a Json object in MongoDB from Laravel 7

I need upload a image to Google storage and insert the below JSON object with the gcs image path in MongoDB. The image is successfully getting uploaded in GCS, but I am not able to get the image url of the image and also not able to update the path in mongoDB. JSON object format Can anyone help me to