212,680 questions
0
votes
0
answers
14
views
Using a prop in an import statement in Vue, using Laravel and Inertia?
I'm trying to dynamically load only specific icons from the lucide-vue-next package in my vue page, however it's not wanting to work. I'm using Laravel 12 (Latest), Vue3 (Latest shipped with Laravel), ...
1
vote
1
answer
43
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="...
1
vote
0
answers
31
views
Storage::putFile() stores file to real disk despite having called Storage::fake()
I have a test which has a setup function that would call Storage::fake() function like so :
public function setUp() {
parent::setUp();
Storage::fake('public');
}
All the tests post an image that ...
0
votes
0
answers
23
views
Query timing out despite making several changes
I have the following query:
$countries = Country::with('place.details')->get();
My website is timing out running this query, even when I set the timeout to 10+ minutes.
I discovered that if I ...
2
votes
1
answer
41
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
1
answer
35
views
Fail on save record on a modal in button action at header of infolist - filament laravel
Fail on save record on a modal in button action at header of infolist - filament laravel
I have a page view AgendamentoView. That display infolist of an Agendamento (schedule). Each schedule have one ...
0
votes
0
answers
78
views
Setup local SSL certificate for HTTPS in Google Chrome [closed]
I got a Laravel App running on an Apache server. I've configured VirtualHost to locally access the app with URL:
https://www.infoalquiler.com.ar/
Despite the app is working properly, I'm getting a &...
0
votes
1
answer
51
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 = $...
0
votes
1
answer
95
views
VueJS blank page [closed]
I'm working with Laravel 12 (with Breeze), VueJS, Debugbar, all in their newest versions. My server is running locally on my MacBook, and developing on this MacBook works fine. The app works correctly ...
0
votes
2
answers
53
views
Replace Laravel's default email validation policy
By default, Laravel's email validation does not fail on invalid email, eg 'example@example'.
$data = ['email' => 'example@example'];
$rules = ['email' => 'email'];
$v = Validator::make($data, $...
-1
votes
0
answers
87
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
91
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 ...
2
votes
2
answers
104
views
Avoiding redundant data in an Eloquent model Instance
I encountered an issue while working on a Laravel project of mine, intended for property rentals. In the database, both the property owner’s and the tenant’s contact information are stored in the same ...
0
votes
0
answers
77
views
Uncaught ReferenceError: Alpine is not defined in Laravel Livewire app
Context:
I am using Laravel 8 with Livewire.
Alpine.js is installed via npm in my package.json:
"devDependencies": {
"alpinejs": "^3.15.2"
}
I am not using a ...
0
votes
0
answers
41
views
Zoom Server-to-Server OAuth App – “URL validation failed” & “Invalid redirect” issues using Laravel (ngrok / Cloudflare Tunnel)
I'm building a Server-to-Server OAuth Zoom App for my Laravel project, and I'm facing two issues during setup:
1. Zoom Webhook – “URL validation failed. Try again later.”
I’m using a local ...
0
votes
1
answer
74
views
How can I use local storage for filament export in production? [closed]
How can I use Filament export in production?
I don't want to use S3 and I want to use local storage.
The exported files are secure and should not be public.
When I use local disk, production ...
1
vote
2
answers
51
views
Vue/Laravel - Mail URL mismatch leads to app root
Vue-Laravel-based environment, Mail sent to user with URL leads to a specific path on application - not app root - , on click it indeed redirects to required path - browser URL bar detects required ...
0
votes
1
answer
69
views
Load different service providers based on the environment
In Laravel 12 how can I load different service providers based on the environment?
I think the documentation is lacking on this topic.
So far I've found 3 potential places:
inside the bootstrap/...
3
votes
1
answer
64
views
Laravel Fortify ignores custom guard for 2fa
I have a Laravel 12 with 2 guards "web" and "admin", the admin guard has its own user table "admins" (privacy concerns).
We have 2 Models "User" and "Admin&...
Best practices
0
votes
2
replies
50
views
Best approach to make a form with multiple models with laravel inertia and react
I'm currently learning inertia with react after using livewire and finding myself quite limited so I'm making a sample project that makes invoices to practice making forms and saving data to a ...
Best practices
0
votes
2
replies
56
views
Deploying a Livewire and Flux Laravel Project on XAMPP and cPanel
I'm trying to set up a Livewire Starter Kit project inside XAMPP (in Windows).
However, I'm running into issues getting it to work correctly. For example, Livewire components don't render properly, ...
3
votes
1
answer
66
views
Problem Searching Using Blind Index in Laravel
I am developing an application that contains sensitive data, and I want this data to be encrypted while still being searchable through the application code.
I found a solution using the CipherSweet ...
Advice
0
votes
5
replies
72
views
Deploy Laravel version 12 (PHP, Inertia, ReactJS, Tailwind) to cPanel shared with no SSH Access
I have Laravel 12 project (PHP, Inertia, ReactJS and Tailwind) project that I need to deploy to a cPanel shared server. I do not have SSH access to the server, and the service provider does not give ...
0
votes
0
answers
81
views
does database chunk() have a memory leak?
In laravel, I have a query that searches thousands of rows in a database, and I trying to compile that into a CSV file. In attempt to reduce memory usage, I get 500 rows at a time and output the CSV.
...
0
votes
0
answers
33
views
SQLSTATE[08S01] Exception is Always Thrown When New Processes Are Created
Horizon Version
5.40.1
Laravel Version
11.46.1 | 12.10.1
PHP Version
8.4.14
Redis Driver
PhpRedis
Redis Version
phpRedis 6.3.0
Database Driver & Version
pdo_sqlsrv 5.12.0, ODBC Driver 18 for SQL ...
0
votes
1
answer
64
views
Laravel + Next.js show method
I know it's an unconventional pairing, but I am using Next.js and the Laravel stack for my app.
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\...
1
vote
2
answers
102
views
Unable to generate slug with spatie laravel-sluggable
I'm not able to generate slug when seeding database. I'm creating an e-commerce website course, learning Laravel as a beginner.
But no error about slug is provided. What should I do? Slug is not ...
4
votes
1
answer
133
views
Problem with cron setting in Laravel 12 that is not working
I have a Laravel 12.39 project (on PHP 8.3) on a shared hosting with cPanel access, and in the cron section, I have the following setting to run artisan schedule:run, but it isn't working. This was an ...
0
votes
1
answer
105
views
Bug with @foreach loop in Laravel 12.x + Livewire 3.6
I am using Laravel v12 with Filament v4 and TailwindCSS v4.
I wanted to build a site with tabs, witch are a Livewire component inside filament/Page. In this Livewire components I have 3 tabs, where ...
0
votes
0
answers
57
views
Deploying a localized Laravel app using Dokku
I am using the laravel-localization package to localize my Laravel app. It works perfectly normal on local enviroment (using php artisan serve) and on shared hosting with Apache.
I've just deployed it ...
1
vote
0
answers
37
views
Show a success message after deletion from nova resource
<?php
namespace App\Nova;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Laravel\Nova\Actions\Action;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Http\Requests\NovaRequest;
...
0
votes
1
answer
85
views
How to add routes in laravel 12 [closed]
Fresh new installation of Laravel 12
composer create-project --prefer-dist laravel/laravel api
cd api
composer update
sudo chmod -R 775 storage
sudo chown -R www-data:www-data storage
sudo chmod -R ...
1
vote
2
answers
75
views
Laravel Sanctum SPA Auth: 419 (unknown status) Token mismatch error
Problem
I am struggling with annoying 419 error trying to logout. The login and register are working fine. My api and spa are on the same top-level domain, but different ports
api - localhost:8000
spa ...
Tooling
0
votes
3
replies
61
views
laravel real time communication
I’m trying to implement a real-time notification system in my Laravel application. The frontend uses jQuery, and the backend uses Laravel’s broadcasting system with Reverb (also tried with Octane and ...
0
votes
0
answers
77
views
Vue/Laravel - CSRF token mismatch
on Vue-Laravel-based environment,CSRF token is initialized server-side -non-sanctum, one token per run-:
routes/web.php
Route::get('csrf-token' , function(){
$token = csrf_token();
return response()-...
Best practices
0
votes
1
replies
37
views
Ignore parent Model Scope in a Child model
I have two models with global scopes.
#[ScopedBy(UserScope::class)]
class User {}
#[ScopedBy(ViewerScope::class)]
class Viewer extends User {}
The scope just checks if class instance has is_viewer ==...
1
vote
0
answers
148
views
How to test laravel on other devices, i use herd and xampp to run it on local machine
I'm running a Laravel project locally using Herd and sometimes XAMPP on my Windows machine.
I’m trying to share a live link so that other devices (phones, laptops, etc.) on the same network can access ...
0
votes
1
answer
116
views
Laravel API returning HTML instead of JSON when served via NGINX
I’m running a Laravel backend alongside a Vue frontend on NGINX. The issue I’m facing is that my API endpoints are returning HTML instead of JSON. For example:
https://isuecampusmap.site/api/ → ...
2
votes
2
answers
175
views
Error "stty: invalid argument" while creating new laravel app or new filament panel
I'm on Kubuntu (25.10) and I just tried creating a new laravel app using the laravel installer laravel new myapp and got this error
In Terminal.php line 114:
stty: invalid argument
'4500:5:f00bf:8a3b:...
-3
votes
2
answers
143
views
malformed uuid format sql server on mac
I get this error:
"message": "Malformed UTF-8 characters, possibly incorrectly encoded",
This is my real id with UUID in the database:
944CC79D-5980-4587-8A52-000A2F11D7D1
...
0
votes
0
answers
31
views
Filament 4 + Guava Calendar: eventClick action opens empty modal (record not passed to action?)
I’m using Filament 4 with the package guava-labs/filament-calendar.
Everything works except eventClick actions: clicking an event opens an empty modal, and no data from the clicked record is passed to ...
0
votes
0
answers
51
views
How to load all CSS files from a folder using Vite in Laravel 12?
I’m working on a project in Laravel 12 using Vite, and I have a directory like resources/css/partials/ that contains several separate CSS files. Right now, Vite only compiles the files that I ...
0
votes
0
answers
37
views
Is it possible to import an entire css folder to the Vite compilation in Laravel 12?
I am using the Laravel 12 + React starter kit, and I want to create several components, for example:
app/resources/js/components/Navbar.tsx
app/resources/js/components/Footer.tsx
app/resources/js/...
3
votes
1
answer
84
views
Laravel Service Container: Am I doing the right thing?
I have an invokable action class called: AttachMembersToRoom . Now, aside from basic form request validations, I also have complex validation, like comparing values across members, identify ...
0
votes
1
answer
37
views
Laravel Observer not triggered during database seed
I have a Laravel 12 application where a BrandObserver is supposed to generate a slug automatically when creating brands. The observer works perfectly when called from a route, but fails during ...
0
votes
0
answers
44
views
How to Keep Filament Tenant Registration Loader Visible Until Redirect
I am using Filament 4.x with Livewire 3.x to build a tenant registration page. I have a custom loader that should display when the user clicks the register button.
The registration button is rendered ...
0
votes
0
answers
21
views
Laravel 12 + React starter kit - what is the proper way to set the "dir" attribute in the HTML element? [duplicate]
Right now, I can set the lang attribute by changing the value of locale inside /config/app.php, but I also want to set the dir attribute.
I can do something like that inside the /resources/views/app....
0
votes
1
answer
66
views
File not found when trying to display a background image from a CSS file
I have an svg file placed in /public/assets/icons, and I try to use it from within a CSS file:
.some-icon {
background-image: url("/assets/icons/arrow.svg");
}
I get error 404 Not Found ...
3
votes
0
answers
97
views
decrypt data hex2bin with different outcomes from same input
Hi,
I'm trying to migrate my APP from Yii2 (PHP 7.4) to Laravel 12 (PHP 8.4) and I also want to move from MySQL 5.7 to Postgres.
In the old app I used to encrypt PII data and saved it to the database ...
-6
votes
1
answer
37
views
Bug appeared when testing get x api key (on postman) [closed]
I'm having trouble, when testing GET X API KEY in postman, a bug appears that the App\Http\Middleware\Apikey class is not found, but when I test the GET method without including the X API KEY there is ...