Category "php"

Python - Include another Python script

I have a question. When you are programming in PHP you can use this to include external php script to current script. include('test_page.php'); So you don't

Not receiving notification when it is sent while the application is killed/closed

My desired outcome is to be able to display a notification when one is received regardless of whether the app is in foreground/background/kill. I am currently a

Display a product custom field only in WooCommerce Admin single orders

This question follows How to show a product custom field (custom SKU) in WooCommerce orders answer to my previous question. How do I make a product custom field

How to test laravel controller method?

My controller looks like this: public function store(Request $request) { $validateData = $request->validate([ 'name' => 'required|u

Laravel MSSQL Server Connection not working

Laravel version:7.13, SqlServer:2019 SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by

Use Python plotly chart in PHP

I have created a pie graph with Python plotly library fig = go.Figure(data=[go.Pie(labels=data["x"], values=data['value'])]) fig = dcc.Graph(id='pie_graph', fi

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