I’m using WooCommerce REST API v3, to perform basic CRUD operations on products and categories, remotely – WP is hosted on one server (e.g. example.com), and the logic doing the CRUD is on another …
Get specific database connection string while logging and connect to that database dynamically in laravel 8? [closed]
I developed a web accounting application using vanilla PHP as backend and jquery and vanilla javascript as frontend. Every client will have one database. The single database contains all client’s …
PHP json_decode due to json element
My code <?php $result = '{ "nid": 4872, "price": "£35.36", "salePrice": "£35.36", "discount": 0, "message": "x3cdiv …
cant update image but can update the details
I’m trying to update the supplier details along with the image. The details are being updated to the database but the image is not getting updated – the old pic is still on the database. No error is …
Split Eloquent collection into multiple arrays based on property name
I’m creating a graph using Laravel Charts and I’m getting the columns (time periods) and the dataset from an Eloquent query. My query returns an array like the following: Period Amount 01/21 200.00 …
Laravel filter relationship data
Code Data return Question: I tried to filtering data that if a relationship “getCauserDetails”, How can I not show the data if the relationship name is only found “test” or should I say null? So on the example output, it displays all the data, but I want to only the data that I filter …
Convert PNG files with transparency to WebP using PHP GD
I have a utility class that loads image files and, among other operations, converts them to other formats. It uses PHP GD. Everything works fine except PNG files that have transparency are done wrong when converting to WebP. The result image has a black background where the transparency should be. This is my …
How can I create bold and italic text etc… Like stackoverflow?
How would I create a post mechanism on my website like stackoverflow with bold text and italic text and other customization like that? Right now my php database has this table for posts : I have stuff for files and text, but I don’t know how I would store the bold/normal text. And how would I take in th…
“php artisan myCommand” handling the post-install-cmd event returned with error code 1
I creaded a console command that will setup the database automatically based on user input and I added that command in post-install-cmd but when i run the composer install command it return error code 1. If i run the command manually like php artisan setupDB it work, I dont know what is the issue. May be I am…
Data from database only shows one data and it does not show
Our html/php code shows the name from the database but the rest of them doesn’t show. Although we used the same syntax for every part but we changed the data name same with the database column name. …