Category "php"

XDebug not working in VScode for php debugging

PHP debugging in vscode using xdebug and xampp is not working even after all configurations. here is my php.ini file config: zend_extension = D:\Xampp\php\e

Problem with fetching data from database in Laravel

I have a search form to list properties/ads through certain criteria. I am trying to fetch all properties based on offer or demand, depending on what is clicked

how to remove particular text from request url

My request url like this localhost/details?hotelid=2--tag&checkin=2022-05-13&checkout=2022-05-15&room=1 i want to like this localhost/details?hotel

how can I set a session variable in Drupal 8 and get it in a php script?

I'm working in a custom module for drupal 8. I have a form and I'm trying to send by means of a submit button some data from my custom module to another php scr

How can I pass the list to the component variable in Laravel?

How can I pass the list to the component variable? I tried to add elements of a list in @php tags like this , for now,, in the future, I will fetch this list fr

yield inside section in Laravel 8

I am trying to yield a section inside another section which is itself yielded in master.blade.php, but it does not work. master.blade.php <!DOCTYPE html>

Docker Volumes in ECS -- how to connect nginx with php-fpm using unix socket

I tried to make the construction like figure1. figure1 In the local environment, I can access http://127.0.0.1 after running docker-compose up -d --build. And I

How to use google play order status api in php

I am trying to fetch order status in real time in php but not able to find proper way or documentation so I can go ahead. In sales api I am getting details of s

Unable to extract Unique Identity for Emails sent from Safaricom Internal Mails ie Message ID (PHP IMAP)

I am having a challenge,I am unable to extract a unique field from emails sent directly from Safaricom Internal Mails to our Customer Service Mailbox. All other

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

I am just starting my journey with servers so I bought one VPN. I installed there ubuntu 18, apache 2.4, php8, webmin, mysql etc. I have two sites based on symf

Composer fails with kylekatarnls/update-helper on new homestead

I have installed a homestead on a new computer. I have pulled my code (which is working on my other computer as well as the server). My project is made in Larav

when i run the code "php artisan migrate --seed" that's not work completely

when i run this code "php artisan migrate --seed" qppeaer one error like SQLSTATE[42S02]: Base table or view not found: 1146 Table 'naryn.modules' doesn't exist

Merge column values from two arrays to form an indexed array of associative arrays

I have two arrays: $a = ['0' => 1, '1' => 2, '2' => 3] $b = ['0' => 4, '1' => 5, '2' => 6] I want to create a new array like this: [ ['

Transpose multidimensional array and join values with commas

How to group by comma of every value as per same key? I need to re-orientate the array so that rows become columns and the new rows need to be joined together

PHP Shell EXEC with Plesk

I made a SH script to add Plesk subscription (newplesk.sh) I need this script to be started from a PHP file. It's working through SSH when typing php testplesk.

Declaration of OM\Db::query(string $statement) must be compatible with PDO::query

I just installed PHP 8 and I have this error appears? How do I fix it? Fatal error: Declaration of OM\Db::query(string $statement) must be compatible with PDO:

To call class only once in laravel

I have laravel application and I have used singleton pattern public function boot/register() { $this->app->singleton( 'className',

Star and Half Star Rating in Laravel

I want to display average product ratings in star. The values are displaying good but I want to show half star if the value is in float. My blade view: <div

Laravel 8 factory state afterCreating

Laravel 7 factories had method afterCreatingState() where you could define what should happen after Model with specific state was saved into database. $factory-

echo language construct is discouraged. (PHP)

why codacy(code review tool) showing "echo language construct is discouraged." how to solve this issue. 1: