I have the following JSON array, I would like to adjust the array to only keep unique name values, meaning id could be across numerous objects, but name must be unique, overall Tim and Jacob can only be listed once. The following is what I have currently tried, but it looks at both values in the object, so it…
PHPSESSID cookie lost after redirect
My website redirects user to the payment Gateway page. Once the user has completed the payment, they are redirected back to my website receipt page process.php. Please note that user redirects away from and return to https page. website URL is exactly the same i.e: user redirects away from https://website.com…
Alphabetic ordering for names
I have been struggling with this for almost 2 days now and i just can not get it to work myself. Basically my goal is to make a list from A to Z, with values from a database. Example: Now my php code looks like this: Now, it does work when i put strings inside the array and remove the
IlluminateDatabaseQueryException SQLSTATE[HY000] [2002] No such file or directory but migrations works [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 months ago. Improve this question first time I ask via the web, but I don’t know what I can do anymor…
Convert php decryption function to C# responds differently result
I created a service that encrypts and stores keys using PHP. The Service returns an encrypted response to the client. The client program will need to decrypt the encrypted data. But the decrypt function I wrote in PHP responds differently in C#. So my php Function: It returns: Now I have converted the above f…
How to map a 2D array to 1D array in PHP
I can’t figure out how to do the following array_map in php. Any help is much appreciated. Input: Desired Output: What I have so far: Here I am mapping to an array and I know it’s not what I want but I can not figure out if there is some syntax for me to return just $x[‘slug’] => $x…
images not appear in the blade page if send it to email by using queue job Laravel?
I send an email to user for verifying, by using queue job after registration, the job run successfully but the (blade page), which sent to the user doesn’t show the images, Although if I sent the blade page without send it by queue job, the images appear fine!? So the issue is that: the images in the bl…
reload `procmgr` in container?
So I have a docker container build with buildpack that runs the following command under PID 1 is it possible to reload the configs passed into procmgr somehow? Answer At the time of writing this, no. The procmgr cli that is used here is very basic. https://github.com/paketo-buildpacks/php-web/blob/main/cmd/pr…
PHP MySQL GET RESULT from INSERT INTO IF NOT EXIST
I know how to do INSERT INTO if the record doesn’t exist. But if it does exist, mysql doesn’t treat it as an error. It just treats it as 0 rows inserted. I want to know if that was the case and return that message to the user that the data they submitted already exists. I know I can do
Laravel 8 – Listen to eloquent events made during a specific request
Currently, I’m trying to wire a telemetry library (OpenTelemetry php lib) to the Laravel event model. The idea is to forward traces to a third party service. A single trace consistents of a request and all database calls that have been made during the request. I’ve created three middleware compone…