Category "php"

Laravel query builder inject column value into Carbon query

I've got a query that I'm running in my project on a model called Domain, it returns all domains where the status column of a domain matches complete and a date

Add shortcode to WooCommerce product description

I am trying to auto-add some shortcode at the end of every woo product description. (not after short description). The code with which I am trying is: add_filte

Cannot use wkhtmltopdf in Docker image php:8.0-fpm-alpine

I am using php:8.0-fpm-alpine3.14 Docker image in which I have a Sylius project and I would like use wkhtmltopdf, so I followed these links: https://sasablagoje

Undefined Variable error when using @foreach

I'm currently working on a project in laravel8 and i've been stuck here for so long and i can't see what the problem is ! i'm trying to make the tours page dyna

Laravel validate() method returns index html page when false

I'm building my first laravel API and when I try to validate some mock form data using Postman with POST method, the application returns to me the HTML of the i

php stdin input return blank value with arabic chars

i'm makin my own php cli but i need to use arabic letters so fgets return blank value from command line input Knowing i'm using powershell to run commands funct

Can't delete WordPress cookies

I am working on WordPress multisite, and I have changed the login functionality. However, it needs the users to delete old cookies before using this functionali

Add data from second 2d array to first 2d array based on related id columns

I have two arrays $a and $b $a = [ '0' => [ 'name'=>'Apple', 'id' => 1 ], '1' => [ 'name'=>'Banana',

Laravel Jetstream - How to join a default team at registration

I am trying to change Laravel Jetstream's logic in order to join a default team at registration rather than create a personal team. I found the method that does

adding jpg image from mysql to html

Just to preface im very new to this so this might be a dumb question but... I am trying to design a website pulling from a database where i've stored the produc

How to add OR for adding multiple gate permissions at construct method of controller

I'm working with Laravel 5.8 and I have created this method in the Controller: public function __construct() { $this->middleware('can:see-brand-r

Load a style sheet into a wordpress plugin

So I'm creating a simple plugin for wordpress that will load new block patterns. I've got everything working except for one thing which is enqueueing stylesheet

how can i send registration activation link email from my custom domain email ([email protected]) using php

i am working on a project (PHP) that allows online registration to access the authenticated only services provided. i want to send the activation link to their

How can I format price in javascript?

I have this PHP code below which can format product price. I want to do this same task with javascript. Is there any way to do this same task with javascript? P

Redirect Loop happen when the session is not set

"Session.php" if(!isset($_SESSION['username'])) { header('Location: ./index.php'); // Redirecting To

openssl_pkcs7_verify(): signature OK, but cannot open for writing

I'm trying to decrypt a payload from a request it's working to decrypt but give me this error I searched a lot but can't find nothing specific. I also used thi

PHP conditionally pass nested arrays as function argument

I got two nested index arrays, which I want to populate with values using a function. But on a conditional basis: if this, populate the first array; if that, po

Laravel - Method Illuminate\\Support\\Collection::makeHidden does not exist

I want to hide the columns password & OTP ,that is included in $uses result. Actually these 2 columns are part of the users table. I've tried like below. B

Laravel pass view field input data to controller and then return calculated value in disabled field

So what i want to do is take values from user input, then do some calculation with it inside the controller with method and that method return value to be displ

PHP array_search is very slow - how can i speed up?

I have two arrays one is a response from an API call where I get information about which email-addresses are already uploaded in the System -> $array_emails_