Category "php"

Need to manual update custom post after wp-all-import run

I everyone first of all sorry for my English, not a native speaker here. I have a problem that is probably WordPress related and not Wp-All-import fault, but th

updating sql with php

I need to be able to update my sql table from open to close task. I already wrote code for this but it is not working properly. On the modal it shows 2 'continu

Lumen prevent duplicate job in a queue

Using lumen 8.2.3 I am only trying to dispatch a unique job to a queue. In app/Console/Kernel I have sent a schedule to $schedule->job(new myJob(), 'high')-

Clean up a comma-separated list by regex

I want to clean up a tag list separated by comma to remove empty tags and extra spaces. I came up with $str='first , second ,, third, ,fourth suffix'; echo pr

Couldn't find constant subresourceOperations, class App\Entity\Comment

i have two table comment and author between them OneToMany relation, i want to display author of comment but it gives me error [Semantical Error] Couldn't find

How to add a script at the beginning of the <head> tag before all other scripts in WordPress

I've been looking for a few days in the stack overflow here but I can't find the answer to my problem. I'm trying to add the Cookie Yes script, to insert the co

I cant migrate database - Homestead

When i type php artisan migrate from my pc it throws an error. 1 D:\xampp\htdocs\cms\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php

how to hide results from database until the seacrh is complete in Laravel?

i am making a search for the website so the user can search for results from database everything is working fine but how can i hide results until the user compl

Laravel efficient way to remove X records if there are duplicates

I'm trying to write a query to be able to find duplicate records based on a column called hash and remove all but the 5 newest records, I figured I could use th

How can I add CDN in php using require_once()?

I'm trying to insert my CSS which is in github repo but when I call it in my php file using require_once() it's not working. Here is my code: <?php require_o

How to change the 'stock management' availability text on single product page based on different conditions in WooCommerce

I'm trying to change the stock management availability text on single product page based on different conditions in WooCommerce. There are 5 situations, dependi

session and csrf dose not work in laravel after enable cloudflare

session and csrf did not work in laravel after enabling Cloudflare and it redirects to the login page after submitting the login form and also before redirectin

Replacement for GuzzleHttp\UriTemplateFactory?

I have a plugin (for Magento 2.4.4), it is using the following class "GuzzleHttp\UriTemplateFactory" but "UriTemplateFactory" is deprecated and removed from Guz

How do I correct syntax highlight in VS Code for PHP 8.1 Enum Class?

My Code: namespace App\Enum; enum HomeStatus: string { case RENT = 'rent'; case MOVE_IN = 'move_in'; case SOLD = 'sold'; case COMING_SOON = 'co

CORS Problem with React js on my PHP from the scratch API

Hello Guys I have a problem on my PHP API i uploaded my API on this website "app.infinityfree.net" whenever I try to access my build in PHP API I get this error

Trying to restrict access to a route if loggedIn condition is true

I am trying to restrict access to the login if the user is already logged in by checking if there is already a token in the localStorage. Any idea on how I can

Working with webhook using paystack payment gateway

I have created an online store with Paystack gateway implemented. Up till now it's been successful, but I need a little help with creating a webhook event scrip

My Xdebug is not working. Why isn't break points not working?

I have installed Xdebug with VS Code and Flywheel local and I am learning how to make themes. I have put a breakpoint in my index.php file. However, the said br

Why I can't get file content using file_get_contents for this site in php

Peace be upon you. I just developed a free PHP tool that extracts YouTube video details of all public videos in json format. It works perfectly with local serve

Why can't I do a comment ( /* like this one */ ) in PHP?

I just downloaded all the PHP's extensions, and this error popped off: And I did what the error says, and when I started coding, I wasn't able to do a comment