Hello so right now I have this data that i retrieved from the database table and the format is [“2021-08-17 23:13:15”] and i wish to change it into something like this 1629243333 (another …
FOR and WHile loop is working in laravel controller
Strangely FOR and While loop not working in my controller function. function information(Request $request){ $exp=0; while($exp=0){ echo ‘While loop‘; $exp++; } …
Nested resource controllers and routes with ajax
I used the following code for web.php. Route::resource(‘products’, ‘ProductController’); Route::resource(‘products.galleries’, ‘GalleryController’); In this address http://localhost:8000/admin/…
PHP is single-threaded , How job and queue works in laravel?
I had an interview yesterday, He asked me a question. PHP is a single-threaded language then how jobs and queues work in laravel behind the scenes?
when i click add, data is saved and also shown on the same page through ajax but if i want to sort data, button is not working
im adding data in the db and at the same time it is shown to the same page through ajax when add button is clicked. now i want to show data in ascending order adn as well as in descending order also. …
Get Ip From Client Apache and Php
Want to ask, but maybe this question is a duplicate. I’m sorry that all the answers to the other questions didn’t work in my case. Question I have a server with apache as webserver running php+7.4 with default settings and certbot as SSL with public IP 192.168.1.11, I want to retrieve the IP of th…
Show JS alert on a form php
I have the following php code, which is a wordpress hook to display an address autocomplete form on my website’s cart page. The function was written in functions.php file. I dont want the customer’s to enter their unit numbers or house numbers. As such, I want to display a simple js alert if a cus…
Error updating record: Unknown column ‘Jason’ in ‘field list’
Forgive me if this already exists, but I didn’t see anything close enough to my issue to offer any kind of solution or path toward solving. My Query: $sql = “UPDATE users SET FirstName=$fname WHERE id=$id”; $fname does equal Jason. But it should be changing the sql field FirstName to “…
PDFlib bad font handle
so I’m currently writing a PHP program with PDFlib and got the following error when generating the PDF: “PDFlib exception occurred: [1434] info_textline: Option ‘font’ has bad font handle 0″….
can I throw custom error in laravel-lighthouse
is the any way that throw an error by GraphQLErrorError with no additional data except message. the current return data is it contains unnecessary data but I want something like: Answer You can throw your own exceptions, that will allow you to do that. Check https://lighthouse-php.com/5/digging-deeper/error-h…