Questions tagged [php]
PHP is an open-source, multi-paradigm, dynamically-typed, and interpreted scripting language designed initially for server-side web development. Use this tag for questions about programming in the PHP language.
1,466,997
questions
0
votes
1
answer
14
views
PHPSpreadsheet, how do I set different layout for each series in a composite graph?
I am trying to create charts in excel using the PHP library PHPSpreadSheet. But when I generate a composite graph with multiple types of graphs together, I get overlapping data labels.
Stacked bar + ...
0
votes
0
answers
16
views
TBS TinyButStrong on PHP laravel : pptx template that doesn't work with certain fonts or font colors
To sum up quickly: I'm working on a mutual insurance application where the salesperson can generate a powerpoint. The powerpoint is generated thanks to a template and this template is filled with tags ...
-3
votes
0
answers
23
views
Loading local host slow [closed]
So i am doing a project using Laravel Php, so actually the project has been upload on live server, and the issue i am having is i am task with modifying the webpage a little, but the issue is after ...
-1
votes
1
answer
29
views
laravel model pages not communicating properly
Working on a client project, hit a setback.
Laravel is reading
"Call to undefined relationship [service_item] on model [App\Models\Service]".
It's simply trying to read data from two ...
-2
votes
0
answers
25
views
Laravel 10 migration data type ( Exg : text, string, longtext ... Etc.) size list in charector and size(kb pr mb)
Laravel 10 migration data type (Exg: text string longtext etc.)
Data type
size KB (char)
String
xx kb (cab)
Text
xy kb (acb)
Can anyone share this list.
A list of data type and it's sizes ( ...
0
votes
1
answer
21
views
getRoleNames method as an accessor in user model. Spatie Laravel Permission
I am trying to create an accessor that will return the users role name. It is possible to access the getRoleNames() method in the User model?
//User Model
/**
* The accessors to append to the ...
-2
votes
0
answers
25
views
React app is giving me CORS policy error. How can I fix it?
I'm trying to make a login page in React using Vite. To verify login credentials I have created an API in PHP. When I test the API with Postman it returns a data but with my react application it is ...
0
votes
0
answers
39
views
Easy way to autonomous periodic data update in Laravel, PHP
How can I autonomous calculate and update value for one column in my Laravel project? I have no much experience in web-dev, so I just dont how to do it effective.
For example, now I've column "...
-1
votes
0
answers
14
views
Laravel MongoDb Aggregation For unique and null
I want to retrieve documents from mongoDb by using MongoClient for parent_id is only first of same and parent_id is null.Only one aggregation.
$search[] = [
'$group' => [
...
-2
votes
1
answer
35
views
PHPUnit 'Error : Class "path\to\class\classToTest" not found'
I'm trying to write some unit tests. However no matter what I do I keep getting this error:
Error : Class "path\to\class\classToTest" not found
The test I'm trying to run has a simple ...
0
votes
0
answers
23
views
A circular reference has been detected when serializing the object of class Symfony error
I am reaching out because I am encountering a circular reference issue. I am using version 7 of the symfony framework I have tried to implement several solutions, such as the attribute: #[MaxDepth(2)]....
0
votes
0
answers
29
views
Using Puphpeteer to scrape web page with no classes or ids [duplicate]
I'm helping a friend to migrate their blog from a "homemade" platform to Wordpress and the original developers have not been helpful in extracting the content so I'm trying to figure out how ...
-3
votes
0
answers
30
views
Get sum of values in multi array [duplicate]
I have an array with different keys, and I am interested in the sum of the values of only the ones that start (or contain) "MT".
$json = file_get_contents($path2);
//echo $json.'<br&...
-3
votes
0
answers
31
views
how can i correctly return array value to jquery [closed]
<?php
include ('config/dbcon.php');
if (isset($_GET['visa-id'])) {
$visa_id = $_GET['visa-id'];
$query = "SELECT document, preference FROM visa_document WHERE visa-id = '$visa-id'&...
1
vote
1
answer
46
views
How to modify a PHP class to accept PgSql\Result as an attribute
I need to find a way (if possible) to make a PHP class accept a PgSql\Result object as an attribute. PHP 8.1+ has migrated the pgsql result resource to the PgSQL\Result instance. In prior versions ...