I have done according to documentation https://github.com/googleapis/google-cloud-php-dialogflow. I got this error – Could not construct ApplicationDefaultCredentials Answer $path -> path to google service acccount json file. put this code above.
How we can share a google docs link with others without requesting access using PHP?
Is it possible to share a google docs link to others so that they can see and edit my google docs without requesting access. I already gone through this link https://developers.google.com/drive/api/v3/reference/files for “webView link”. But I am not getting it how to use it in my code using PHP so…
How to call custom made function usin via parameter in laravel notification?
devs,I am using laravel 8 I create a notification inside that I made my own funciton toTwilio mention below code. Problem: how can I call that function. I include in return parameter of via() function but it shows me “driver [twilio] not supported.”. I do not register anything anywhere. and I trie…
Problem with create table Category and get the url correctly PHP
I am creating an ecommerce, which can have Men’s Fashion, Women’s Fashion or Children’s Fashion, it could also have more in the fure like Sports, Electronics, etc. But I don’t know if I have, for example, to repeat the categories clothes, etc for each one or not, I don’t know if …
REST convention when transforming data
I use Laravel as a REST API service for uploading and storing books. The book service follows the standard REST convention: GET: /api/books and /api/books/<book_id> for retrieving book(s) PUT: /api/books/<book_id> for updating a book POST: /api/books for adding a new book DELETE: /api/books/<bo…
Extract a YYYmmDD in PHP
I have images and videos from my camera which are uploaded to my server. In order to properly organize them I need to extract the year month and day. But I cant seem to get this pregmatch right.. Input would be 20211215_083437.jpg Output would be Year2021 Month11 Day15 Answer You need to remove the $ anchor i…
Merge every 2 arrays in a Multidimensional array PHP
So, this is a complicated question for me. Let’s say we have an array that goes like this: supposed to be FAQs question and answer are more than 1, the arrays above separates the faq question and faq answer in 2 different arrays and given that the array is a result of a 3rd party API (which you cannot c…
How do I get the current user’s id in this Laravel 8 and Auth0 API?
I am working on a Laravel 8 API. I use Auth0 for user registration and login. At registration, I need the user’s id returned by Auth0 (as user_id), in order to insert it into my own users table, in a column called uid. Also, once a user is logged in, I need to display the user’s data at myapp.test…
Populate Dropdown from Zoho Response
I am trying to populate a dropdown from the ZOHO API response I am getting with my request. I have two files. request.php and zoho.php. I am receiving the response from request.php as below. in order to get the result I am decoding the object as below I am having a popup in zoho.php. The way I am looping the
Laravel create custom exception with parameters & return as JSON
I want to throw a custom exception if the variable is null and return it as JSON. I’ve tried like this: Controller Custom Exception But when I am trying to test it using postman, the return I got is not the same as I wrote in NullException. It becomes like this: Answer In your case you are returning the…