Category "php"

How do Laravel and Docker play together?

I want to get into Laravel development. As per Laravel's installation guide, I have installed Docker first, which was a first for me. But for me to finally inst

How to get quarter for future date using Carbon?

Simple question: How to get carbon get quarter for future date? Example: Given datetime: 2023-05-03 14:34:09 I want print which quarter will be using Carbon Not

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

everybody! I've finished a laravel project backend with postgres and it has a phpunit tests, everything it works. So, I did upload to Github. When I did "git

Get sum of arrays inside array

How do I get the sum of this arrays. $arrays = [[0, 176000], [0,500], [0, 3960000]]; The output should be: $arrays = [0, 4136500]; Any help will be much

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

I am faced with an error in log files This ERROR - 2022-05-13 02:47:21 --> Severity: error --> Exception: Too few arguments to function Transactions_model

PHP DRY Principle if.. statement

I am still learning and have been reading on DRY Principles for a while now, was told by my mentor that I need to adhere to the DRY principle for this code belo

PHP DRY Principle if.. statement

I am still learning and have been reading on DRY Principles for a while now, was told by my mentor that I need to adhere to the DRY principle for this code belo

How to change User::Model In Laravel with User Auth in Firebase

Recently I have make Laravel auth with composer require laravel/uiand I can edit/create user with MySQL where as auth users for Firebase . I also can create/

How to change User::Model In Laravel with User Auth in Firebase

Recently I have make Laravel auth with composer require laravel/uiand I can edit/create user with MySQL where as auth users for Firebase . I also can create/

How to add width and height to Wordpress Gutenberg image block output?

Default Gutenberg Image block i HTML output has no height="xxx" and width="xxx" parameters: <div class="wp-block-image"> <figure class="aligncenter si

PHP SOAP insert data StructType wsdltophp

I am working in a project where I must call SOAP WS. I used WSDLtoPHP, that's really helpful. I can READ data, and now I would like to create new item with the

Cant save webp format with imagick

Im developing a panel in which Im uploading a jpg, it copies it, resizes it, saves another jpg and now I want also to be able to create a copy but using webp ex

Load a .env file with PHP

I'm currently coding on a pure PHP project and I need to load an .env file to get some variables. After a bit of searching I turned to the vlucas/phpdotenv plug

Dynamic themes selection by user(PHP) from multiple theme

I want to add dynamic themes to my php website which will be stored from the user's database and next time when user uses the website that theme should be shown

How to debug in WooCommerce 3+

I am creating a custom shipping method for Woocommerce using this tutorial https://docs.woocommerce.com/document/shipping-method-api/ but I am having issues deb

Laravel Livewire: jQuery not working in child component loaded via @if statement

I'm using Laravel 8 and PHP 8 and livewire 2. I have a Fullpage Livewire component. I have a button, to toggle a simple flag between false and true. <Button

Webscraping Symfony/Panther: Can't get HTML

I want to scrape a site with the symfony panther package within a Laravel application. According to the documentation https://github.com/symfony/panther#a-polym

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

I've just deploy a new laravel 7 application on AWS Elastic beanstalk. I've noticed they changed the Apache server to Nginx server. https://docs.aws.amazon.

How to write PHP in XSLT

I have been trying for the longest time to write a simple php echo statement in a .xsl file, but every site that I look at does not seem to function for me when

Add customer email and phone in "Order" column to admin orders list on Woocommerce

I am trying to find a way on how to add the customer phone and email below the name on the WooCommerce order view. See picture for reference where I need to ad