Category "php"

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

I am upgrading to PHP 8 and getting the following warning: Function libxml_disable_entity_loader() is deprecated What I have: This code saves the current entity

How to get multiple values with same key from an array PHP

I have an array where a key has multiple values. The key is the width of a product and the values are optional prices. The customer first chooses a width and th

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

I want to generate 'Image inside QR CODE' with dynamic url and Image. I have mentioned the below error and code. Used the https://www.simplesoftware.io/#/docs/s

Query Optimization, changing the queries in the loop into a single processing query

How do I optimize these queries to be one or two? The one in the loop to be one at least. $applicantIds = \DB::select()->from( 'applicants' )->where( 'cre

How to make a array inside array?

I have this two array. I want to make a array inside an array like this. How can I achieve that. Code posted below. This is the image I am sending inside fileTo

Render the content of default_filter.php in Joomla front-end

I made a custom component with a table that needs some filters. I render the filter fields on my view by doing this: This is the code inside tmpl/supportcases/d

how to loop through json response data using ajax jquery?

I'm trying to loop through a json response with ajax jquery but I can't display the result. Here is the code Im using: data.php function platformsList(){ $q

How to show id in Resource Routes url?

Update: This line of code in the frontend was the culprit: <inertia-link v-if="options.edit" :href="'/admin/gallery/edit/1'"> I had to change it to: <

php curl_exec() Connection refused when retrieving a remote image

I want to retrieve a remote hosted image with php. The image exists, I can access to it with my browser. However the result of the curl_exec() is empty and the

PHP mail sending empty mails

I'm similar to php and don't undestand what is the problem. Sometimes php function send me empty messages like Vanema nimi Lapse nimi: Linn: Telefoninumber: Ema

How to change 'users' auth table and use another instead Laravel

So I just started a Laravel Project with Breeze, and I wanted to change the default table users , the problem is it didn't work, I did my research for days and

configuring stripe webhook, Test webhook error: Unable to connect

So I am trying to implement a stripe webhook to listen to various events. Basically I have my php application running live, say on "http://example.com". I have

PHP Deprecated issue when running artisan command

Whenever I run an artisan command I am getting this issue. I am using Valet and PHP 8.1. I have tried changing versions of PHP but I still get this issue. When

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

I just upgraded laravel 7 to laravel 8.30.1 and I am trying to add the default value of pivot column object_model of term_relationships table using the newly in

Autoload nested folder classes in custom namespace with composer

i have these directory and file structure. i want to load my Wtf class in Models namespace. in fact i want to add some providers to my project and want to locat

Laravel reuse session on subdomain

Let's say, I created 2 server and 4 sub domains. example.com and first.example.com route to first server. second.example.com and third.example.com route to seco

SYSTEMPATH/CodeIgniter.php at line 219

CodeIgniter show this problem: SYSTEMPATH/CodeIgniter.php at line 219. I already added extension=intl to php.ini file. But the error still. Error : The framewor

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

I manage to do partially just one part, but cannot make the second part work. If a word has < 4 characters, only * should be included at the end of that wo

Is Laravel Sanctum suitable to give API access to Third-party server?

We built an API (which currently contains just a single route) to give access to specific data to another company we are working with. The API calls this other

PHP Unknown: [UNAVAILABLE] FETCH Server error while fetching messages (errflg=2)

When running the following command once: <?php $imap_structure = imap_fetchstructure($mail_connection, $email_number); ?> I get the following error messa