Category "php"

Is it possible to change the way EasyAdmin load entities in index?

in my project with Symfony (PHP), i use EasyAdminBundle and i'm wondering if it's possible to change the way easyadmin load entities with pagination? I would li

When to use action injection and when to inject dependencies on the constructor for controllers?

In Symfony you can direct inject a service into a controller function: use App\Service\FooService; class FooController { public function one(FooService $fo

Add a minimum order price in WooCommerce, but still allow the customer to checkout when the condition is not met by charging the deficit

I would like to add a minimum order price for WooCommerce. I have found instructions on how to restrict ordering, unless the user adds more products to cart so

Replacing characters in a returned Header Location in PHP

I'm trying to filter returned header location after POST using below PHP code. The returned header location is required for further processing of the payment st

RedisException php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

I have Redis and php-redis extension installed but whenever I wanna use a queue in Laravel I just get the error below RedisException php_network_getaddresses: g

Variable undefined error in laravel blade component view

Component InputError.php <?php namespace App\View\Components; use Illuminate\View\Component; class InputError extends Component { /** * Create a

InvalidArgumentException View [layouts.app] not found. Larave-8 LliveWire-2

When I change app.blade.php to base.blade.php I am having the following error. InvalidArgumentException View [layouts.app] not found. (View: D:\Code\my-app\ven

Valet is not working with php.8 Nginx return Bad Gateway

Hi I have try to update php to 8.0 but always there a problem with valet to read the new version and I try to solve it without specific instructions but this ti

Symfony6 FindBy and entity many to many

I use symfony6 for the first time with php 8.0.17. I want to make a small form that allows me to retrieve "Card" objects. My "Card" objects are bound to many to

FPDF generates an automatic line break

Good morning everyone, I'm printing a format with FPDF, but there is a cell that contains the field "The line of business or gyre" does not respect the same lin

Can not upload image into the database in codeigniter

I'm trying to upload a image to the database in codeigniter , but when I write $this->load->model('Upload_model');$id = $this->Upload_model->add_ima

While creating model with factory, migration and resource controller for api inside new repository, conflict encounters in migration as below:

Used Command: make:model Models/Test/TestApi -a Error: root@bb3433d4a92b:/var/www/nt-app-backend# php artisan make:model Models/Test/TestApi -a Model created su

Check password for correctness with php crypt

I have this password in the database: $pbkdf2-sha256$25000$dsvza5WnPh0eldHhp59PiQ$1YUkXJIl6Ek5keGRauKIPmNiIQZEbqA.nD.bJrhtul0 plaintext password is: testtest H

i want to echo this string but its not working [closed]

I intend to echo the string if the string isn't longer than 20 characters. But it's not working even though the string isn't longer than 20 c

PHP foreach loop on unknown depth multidimensional array

I have a multidimensional array consisting of a directory structure or a tree if you want, but how can I loop through this data when I don't know the depth of t

Phpunit @runInSeparateProcess ErrorException: unserialize(): Error at offset 0 of 3 bytes

I am writing a test to check the output(printing the result) of a function, that is changing headers and printing the result. To simplify it look like this: fun

Get associative array after post via ajax

I need to send a form and a array/string to the server. My Ajax looks like this: var formData = $("#formpv").serialize(); $.ajax({ type

Coupon daily time range in WooCommerce

I'm tying to enable the use of coupons to a range of hours in Woocommerce without success. Based on Discount on specific products based on a daily time range in

Uncaught ArgumentCountError: mysqli_stmt::execute() expects exactly 0 arguments, 1 given

I am trying to build a site where I can upload multiple images with php and mysql but I am getting below error: Fatal error: Uncaught ArgumentCountError: mysql

Parsing WSDL: coudln't load from URL only for my current URL in SOAPCLIENT?

I am using SOAPclient in PHP for my integration but after so many tries and so many efforts I am not able to achieve what I was supposed to, Actually I am integ