1,464,508 questions
0
votes
0
answers
24
views
How do you move the function definition for the ->when() function in Laravel Eloquent Models?
so I'm building a way to organize Items based on different requests:
$items = Item::query()
->where("type", $itemType)
->when($mode, function (Builder $query, $...
4
votes
1
answer
47
views
Why does PHP setlocale not seem to accept a script subtag?
If I run the following code on a Linux server
<?php
declare(strict_types=1);
error_reporting(-1);
ini_set('display_errors', '1');
var_dump(Locale::acceptFromHttp('zh_Hant_TW'));
echo "<br&...
-1
votes
0
answers
31
views
Adding cover/album art during concatenating two mp3 audio files with ffmpeg using PHP shell command
I'm trying to join two mp3 using variables from file path and its working okay. now i want to add a cover art photo to the concatenated mp3 output("audio_output").
How can i do that?
$shell =...
-1
votes
2
answers
73
views
Problem using PHP extension on Apache24 on Windows [closed]
I'm running Apache24 with PHP enabled to use the Kanboard app. Everything works fine, but if I remove the path to the PHP folder from the Windows PATH, I get an error when loading the localhost/...
0
votes
1
answer
38
views
WooCommerce Hook is not firing and seem to be deprecated [duplicate]
I know it's 2025, and this problem seems to be all over the place, and I've been trying all the recommended solutions, but it seems it's mostly old code. But I don't really know; I'll try to sum it up ...
2
votes
1
answer
63
views
How can ship multiple different sources for the laravel-vite-plugin besides app.js?
Currently the app has 2 entry points for the JS and CSS files in the blade layout file:
{{-- layout.blade.php --}}
<head>
<meta charset="utf-8" />
<meta name="...
4
votes
3
answers
95
views
Why does the_field function of ACF plugin return an empty value?
I know that there are similar questions to my question like this one:
Insert php variable in a href
But my problem does not solve with them! I am using "acf plugin" for adding some codes to ...
2
votes
1
answer
46
views
PHPStan complains about @var Builder<ProductTemplate> in Laravel Eloquent scope
I'm trying to define a Laravel Eloquent model with a custom scope that filters categories by a related product's vendor_id. Here's my setup:
class Category extends Model
{
public function ...
0
votes
0
answers
45
views
Azure Table PHP Retrieve Latest Data First with Pagination
I am using this:
https://github.com/Azure/azure-storage-table-php
to insert data to azure table.
However, when I retrieve the data, I don’t get the latest entries unless I use a do...while loop, as ...
2
votes
2
answers
82
views
How to change the title of the billing field?in Woocommerce
I found some old code here to change the name of my 'Deliver to different address?' title in Woocommerce. Works perfectly... but I also want to change the name of my Billing Details title, to Billing ...
1
vote
1
answer
57
views
Why Image::make of spatie/laravel-medialibrary raised error? [closed]
In laravel 11 app using spatie/image "^3.8" and spatie/laravel-medialibrary "^11.12" I need to get all properties of image and I do
use Spatie\Image\Image;
...
$itemMedia = $...
-1
votes
0
answers
61
views
How to install league/csv bundle with Doctrine v3.3 on Symfony?
I am having a problem today installing the league/csv bundle (v9.27) on my Symfony (v7.2) project with doctrine/orm (v3.3)! When I run command php require league/csv, I get this message:
Your ...
0
votes
0
answers
137
views
404 on certain files on select devices after repeated visits [closed]
I run a webserver on my local network to host my movie collection. I also have a custom android app running on an amazon fire stick. Recently I have been working to enable video playback from external ...
-1
votes
0
answers
91
views
How to authenticate API routes in Laravel 12 using Sanctum [closed]
I have a route which I wish to protect with a token, using Sanctum.
The offending route is /status, which would be accessed by /api/status.
The /foo route works fine, there is only a problem when ...
1
vote
1
answer
92
views
Why does Laravel read the schema as if it had 2 primary keys? [duplicate]
Here's my laravel composer.json for its version info:
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton ...