212,677 questions
0
votes
1
answer
26
views
Livewire starter kit - where do I change where users are redirected to if they're authenticated and trying to access guest routes?
Right now, when a logged in user is trying to go to guest only routes such as /register while he's already logged it, it redirects to the /dashboard route.
I couldn't find where to change that.
On ...
Tooling
0
votes
1
replies
56
views
VS Code syntax highlighting error when using Blade variables inside Alpine.js @click directive
I am using Laravel Blade with Alpine.js. I am trying to pass Blade variables (an ID and a string) into a JavaScript function using the @click attribute.
However, VS Code is flagging syntax errors (red ...
Best practices
0
votes
3
replies
86
views
How to condense multiple boolean colummns into one column in laravel?
How to design a scalable user badges system without creating many boolean columns?
I'm building a badge system where users earn specific badges by completing certain tasks.
Right now, my database ...
-4
votes
0
answers
64
views
How do I connect my Laravel backend to a front-end form using Ajax for form submission? [closed]
I’m currently building a full-stack project (Blog CMS) using Laravel for the backend and HTML with Ajax for the frontend. I want to submit a form from the frontend using Ajax and have the data handled ...
0
votes
3
answers
57
views
Example .gitlab-ci.yml for Laravel 12 with MariaDB that seeds database before running php artisan test
I'm setting up a GitLab Runner for a Laravel 12 project and I want my CI pipeline to do the following:
Spin up a MariaDB service for the tests
Run php artisan migrate:fresh --seed to seed the ...
-3
votes
0
answers
26
views
Cpanel- Still seeing the Old website even though i deleted all its files and replaced it with new ones [closed]
I'm stuck on a weird issue with a shared hosting cPanel environment and hoping someone here has seen this before.
I recently replaced an old static Next.js site with a new React (Vite) build. The new ...
0
votes
0
answers
26
views
Tap Payment with html iframe [closed]
I have a laravel 7 application, my frontend is in Bootstrap 4. Now i want to use Tap Payment in iframe. I implement it but the callback url is not working. It shows below error:
Access to fetch at '...
-3
votes
0
answers
47
views
laravel tinker on windows gives The system cannot find the path specified [closed]
Windows 11, PhpStorm 2025.2.5, Laravel 12.39.0 project
In the PhpStorm Windows Powershell,
PS C:\Users\peter\PhpstormProjects\piotr3> php artisan tinker
Psy Shell v0.12.14 (PHP 8.2.12 — cli) by ...
-1
votes
0
answers
54
views
how to fill textarea value using jquery and parse html inside [closed]
I'm developing a website with laravel as backend and pure js as frontend. I'm getting a field named Bio and in backend I'm removing any unwanted html tags and keep the ones I need with mewebstudio/...
-1
votes
0
answers
66
views
Casting as an int results in unexpected value (rounding?) [duplicate]
I had unexpected rounding issues when storing values in database columns that are defined as decimal. Bad practice and not ideal. So i changed to a bigint column in the DB and multiple every amount * ...
1
vote
2
answers
98
views
Laravel and Vite within a Docker container
I'm attempting to containerise a laravel project which will be running vue, as webpack is now not a standard and vite is, for me to run vite it would then refresh if something in the project has ...
Best practices
0
votes
6
replies
101
views
MySQL Eloquent ORM - where clause: value could be null
I'm a bit unsure about how to proceed with Eloquent ORM (Laravel 12) queries when a value COULD be NULL.
Normally, you would check for a NULL value with:
->whereNull("column")
But if you ...
0
votes
0
answers
38
views
GuzzleHttp send base64 image as in raw json
I need to send a image to an API and it has to be base64 encoded and send as raw json.
The request sent by Postman is received correctly
But when I try to do the same request with Guzzle I am ...
0
votes
1
answer
106
views
Laravel Valet fails to install via Composer on Mac (Apple Silicon)
Installed composer via brew. All good. Added path to composer folder in my .zshrc file -
export COMPOSER_HOME="$HOME/.composer"
export PATH="$COMPOSER_HOME/vendor/bin:$PATH"
Ran &...
-1
votes
0
answers
35
views
dependency error installing socialiteplus [closed]
I am having a problem installing blaspsoft/socialiteplus. I don't know what the issue is - illuminate/http and illuminate/contracts are set to ^12.* in composer.json:
{
"require": {
...
0
votes
0
answers
121
views
How to fix EOF Server Ollama Error when embedding
I built the RAG system in Laravel with Neuron AI framework. I tried to store docs to the vectorstore but I got error:
[2025-12-04 06:49:45] local.ERROR: Server error: `POST http://localhost:11434/api/...
-5
votes
0
answers
39
views
How do I make Laravel cache static assets/files from my public folder? [duplicate]
How do I make Laravel cache static assets/files from my public folder? For example in Django, when I load in the site, and then visit other links/URLs within the site it doesn't reload the other ...
Best practices
1
vote
3
replies
94
views
How to safely scope queries by user permissions?
I have a multi-tenant Laravel app using a shared database with tenant scoping. Each organization can define base permissions for its members.
Example: if resource.view is enabled, all members can view ...
0
votes
0
answers
40
views
I'm running a laravel with latest nova (5) but I am at a loss on how create a custom layout for my metrics/pages/dashboards
I'm honestly buffled at how difficult it is in Nova to apply even the slightest customization. In my case, I'm simply trying to add a new layout to a page, it shouldn't be that hard but no matter what ...
3
votes
2
answers
140
views
How do you move the function definition for the ->when() function in Laravel Eloquent Models?
I'm building a way to organize Items based on different requests:
$items = Item::query()
->where("type", $itemType)
->when($mode, function (Builder $query, $mode) {
...
1
vote
0
answers
60
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), ...
2
votes
1
answer
79
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="...
2
votes
0
answers
87
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
1
answer
48
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
61
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
46
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 ...
1
vote
1
answer
67
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
107
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
69
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
vote
1
answer
102
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
114
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
87
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
60
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 ...
1
vote
2
answers
54
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
77
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
69
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
60
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
66
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
75
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
83
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 ...
1
vote
0
answers
105
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
36
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
66
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\...
0
votes
2
answers
110
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
148
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
113
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
66
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
1
answer
52
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;
...
1
vote
2
answers
100
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
64
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 ...