As the title says I’m trying to use webhooks to automate some of the Stripe events which occur when a customer goes through the subscription process. In my webhooks.php file these are the bits of code that I don’t understand: /* The are my comments */ // These are comments from the Stripe docs Ans…
Assign filename dynamically in a response
in my web application created with Laravel 8, I need to download an .xml file and the file name must be dynamically created, as per the title. this is because the file name is composed following a specific rule and having to include today’s date. $filename = ‘FirstPart_’.date(“Y-m-d…
How to display fractional part of a decimal in tens in French
I want to display a decimal in words in French. I succeeded doing that using the NumberFormatter class. Here’s my code The output was vingt virgule un sept instead of vingt virgule dix-sept Please how can I fix this? Thanks Answer vingt virgule un sept is correct though. It’s just another way to s…
mysql query in procedural php isn’t returning single field
Trying to retrieve a single field from a mysql table. Here’s the PHP: I then use ajax to retrieve $sigDAT Ajax returns the following result for $sigDAT: [object Object] Ajax returns $signatureDAT (the original data) correctly. $sigDAT and $signatureDAT should have identical value, so I suspect the probl…
How to save Gravity form data for non-logged in user
I have created a multi-step gravity form. Here , any users ( Logged In / Non-Logged In ) can see this form. Talking about Non-Logged In users , if the user visits the form and fill the form by completinging ALL 6 steps , and when at the end , User submit Form , One Login POP-UP will be shown.(
Xampp port 80 is use
Port 80 in use by “”C:Apache24binhttpd.exe” -k runservice” with PID 30352! Apache WILL NOT start without the configured ports free! You need to uninstall/disable/reconfigure the blocking application or reconfigure Apache and the Control Panel to listen on a different port Edit : I̵…
How can I get the average star ratings? PHP Codeigniter
I am creating a rating system where the customer can rate the seller. I am using the rateyo plugin, so there’s a float value on it like 2.9, 3.8, 4.5, etc I would like to get all the values of the seller and get the average from it to display his/her overall total ratings. I am using Codeigniter as a
Sort Array from object
I have an object and store it in an array. However, when outputting the names from the object, I want to sort them by ‘is_main’. Thereby ‘is_main’ with the value 1 should always be in the first place and then ‘is_main’ with the value 0. Here is the Object And my PHP Code: I…
Get collection values without loop in Laravel
I have hotels and services tables with many to many relationship. I want to get services of specific hotel without using foreach or forelse loop from one line of code. This is how I tried to do that: Result I get: Result is an array of values, I want it to be without brackets and quotes. Any suggestions? Answ…
Converting files using PHP LibreOffice and the ncjoes/office-converter library
I am using ampps as a windows 10 apache server, my php version is 7.3. I downloaded it from the LibreOffice download page and installed it on my computer. Then I installed this library via composer https://github.com/ncjoes/office-converter. I try as in the example given, but it does not convert and gives an …