Category "php"

LTI integration with Laravel websites as LMS

There're two websites of educational courses. I own the one built with Laravel. I want to access another website's courses into my website. So basically I want

Swoole server run failed, "unsupported option [worker_max_concurrency] in @swoole-src"

i successfully install swoole on mac. but when i try to run it from the app dir php bin/console swoole:server:run the console return: Error: Uncaught ErrorExc

Group data in a multidimensional array based on two columns

I have an indexed array of associative arrays like this: [ ['brand' => 'ABC', 'model' => 'xyz', 'size' => 13], ['brand' => 'QWE', 'model' =&

Doctrine - The referenced column name 'id' has to be a primary key

Hy, I have problem with validation and schema creation I am creating an api via the api platform, (this is my 1st project under symfony) I have a constraint, th

How to use a PHP MVC Controller, one thats invoked by calling a URL, to call and execute more than one function? [duplicate]

Currently I have been teaching myself CodeIgniter3, which is a MVC framework. I am failing to understand a couple of things. One such subject

Docker & Laravel : configure: error: Package requirements (oniguruma) were not met

Can anyone help me with this problem. When i try to create a docker image from a dockerfile for laravel application i get this error: checking for onigurum

how to avoid w3c markup validation to use server redirection via url checking

I found the w3c validator very useful for me for testing the final markup of a current page. I have a link for each of my page, like this: https://validator.w3.

Symfony 3.4 and MySQl 8. General error: 2006 MySQL server has gone away when running a transaction in a rabbitmq queue

I have one system (Symfony 5, symfony/messenger) sending data to another (Symfony 3.4, enqueue/enqueue-bundle 0.9) using a rabbitmq queue. The data is used to c

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

I'm trying to migrate from my old PHP 5.4.45 + Smarty 2.6.28 to my new PHP 7.2.25 + Smarty 3.1.33. I'm tuning some small pieces of code, it works in most of we

cakephp save drag and drop list order to database

I have a list and I want to let users reorder the list. For the front-end functionality, I am using UIkit. The list can be reordered on the front end up but I a

Laravel 8 eloquent query delete

How to delete the aircon in database when there is no any data. Order and Aircon are many to many relationship. $orders = Order::with('aircons', 'user')

How to Generate PDF invoice to XML format using mPDF

I have a pdf invoice format and want to generate xml invoice format as per ZATCA if any did it please need help. I saw this in mPDF but didn't figure it out how

My password_verify for a value from database always return false

include("src/database.php");#this included file works wll $query=mysqli_query($conn,"SELECT * FROM students limit 1"); $data=mysqli_fetch_assoc($query); echo "m

how i can fix this elephant.io connection probelm

My client interconnection socket = io.connect('http://localhost:3000', { transports : ['websocket'] }); Before adding transport, it was not connecting on the cl

HTML + PHP + PHPMAILER

obs: using translator I have a problem on my website, every time this is sending the normal email, but it looks like an error message, in the template I got, it

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

I am upgrading to PHP 8 and getting the following warning: Function libxml_disable_entity_loader() is deprecated What I have: This code saves the current entity

How to get multiple values with same key from an array PHP

I have an array where a key has multiple values. The key is the width of a product and the values are optional prices. The customer first chooses a width and th

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

I want to generate 'Image inside QR CODE' with dynamic url and Image. I have mentioned the below error and code. Used the https://www.simplesoftware.io/#/docs/s

Query Optimization, changing the queries in the loop into a single processing query

How do I optimize these queries to be one or two? The one in the loop to be one at least. $applicantIds = \DB::select()->from( 'applicants' )->where( 'cre

How to make a array inside array?

I have this two array. I want to make a array inside an array like this. How can I achieve that. Code posted below. This is the image I am sending inside fileTo