Category "php"

Why i get wrong output for html markdown?

I am using the html-to-markdown library, to print the markdown for a h1/h2 tag, but see that it is printing wrong. I believe the sample output should be: Test

laravel sanctum Route [login] not defined

I am trying to get the current user in my laravel vue application. And whenever I trie to get it i am getting this error: Symfony\Component\Routing\Exception\Ro

How do I set the maximum php memory limit

How should I set 10GB of memory_limit? Should I display it as memory_limit=10G or memory_limit=10240M

Laravel Database Strict Mode

I'm little wonder please help me out. My query is :- Invoice::join('orders', 'orders.invoice_id', '=', 'invoices.id')->groupBy('invoices.id')->get();

Change user role if checkout custom checkbox is checked in WooCommerce

I'm trying to add a custom function to my child-themes functions.php file where a checkbox is added to the bottom of the billing details form on the checkout pa

How to create a scheduler application in php

I want to develop a scheduler in php I know there is cronjob already present in php but I want to develop like java but I don't want to use sleep(1) method. I k

Shopify password update using Shopify API

Can we update password for a User or Customer that already exists in Shopify using the Shopify API?

Changing currency on checkout with WooCommerce Multilingual Plugin

I'm trying to implement currency change on checkout with WooCommerce Multilingual Plugin. I need a country with COP and the rest of countries with USD. First I

Sum array values of a column within each column of an array with 3 levels

I'm trying to use array_sum() on columns within columns of a multidimensional array. For eg: I have an array that looks like this: $array = [ [['value' =>

Symfony 5 : Authentication failed in prod env

I have an application that I'm trying to upload to my FTP server. I've run : symfony console make:user and also symfony console make:auth So while running the s

find in set in laravel ? example

I am new in laravel. My query is i need to find out value from comma separated field. Here is my table: tags_value id tags 1 css,html,php 2 php,java,css 3 java

Laravel views are showing from cache on one server but works fine on other server

I am working on Laravel(5.4) project. I am facing an strange issue regarding the laravel views. My all views are working fine but some views are always showing

mysql slow on updates for a well optimized query

i am facing an issue with update state , which takes up to 4s on very small queries . Count: 1 Time=3.87s (3s) Lock=0.00s (0s) Rows=0.0 (0), ***[***]@localho

laravel 5.6 bulk inserting json data

I am trying to build an API to store and retrieve MCQ exam papers. I am using laravel resource class to send handle Json data. I need to insert 40 records into

best way to store error messages in Laravel (session or variable)

I'm trying to find out what is the best way to store error messages (due to wrong parameters for e.g). Assuming I'm declaring the accepted parameters in the Co

PHP my timezone is no setting up in PHP.ini File in xampp

I've xampp installed on my Local PC. But I've a Problem in my Timezone. PHP date shows my Date & Time 02/11/2018 05:26:18. but my PC Time is 02/11/2018 09:2

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

I have a Dockerfile with a build command like this: #install some base extensions RUN apt-get install -y \ zlib1g-dev \ zip \ && dock

Execute only one time and then wait set period of time before executing again

I am trying to make a pop up execute only 1 time for a user every 30 days. Currently the pop up is being executed in an infinite loop. Every time I trigger it e

Cannot return objects in @dataProvider PHPUnit

Is it allowed to return objects from @dataProviders to test methods? public function iOsMessages() { return [ 'update available' => [1,

Symfony/Form add attribute based on the data

In one of my custom form types I need to add a custom HTML attribute to the field. However that attribute is based on the data. So I added an event handler but