85 questions
0
votes
0
answers
56
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 ...
Best practices
0
votes
1
replies
32
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 ==...
0
votes
0
answers
20
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....
Advice
0
votes
0
replies
46
views
How to properly build an HR Management System using Laravel (API) + Next.js (frontend) with token authentication and middleware?
I'm building an HR Management System using:
Backend: Laravel
Frontend: Next.js
Authentication(SPA): Laravel Breeze (already set up for backend)
I'm a beginner in Next.js, and I’m a bit stuck on how ...
1
vote
2
answers
170
views
Backend Laravel api and frontend vuejs works in dev but not in production on a shared hosting
I am trying to deploy an application on a shared hosting (LWS).
My app uses Laravel12 as a backend and Vuejs as frontend
The frontend is installed directly on the domain.fr and the backend on a ...
2
votes
1
answer
104
views
Assets not being loaded in Laravel 12 using storage:links
I´ve created a duplicate project of mine to upgrade from Laravel 10 to Laravel 12. As far as the PHP code, routes, and database everything went well as expected.
Yet, in my Laravel 10 project I had my ...
3
votes
0
answers
95
views
Implicit model binding fails when using {locale} prefix in routes
I'm working on a multilingual Laravel 12 app. All my routes are grouped under a {locale} prefix, like this:
Route::prefix('{locale}')
->group(function () {
Route::get('/activities/{...
0
votes
1
answer
66
views
How can I set Redis key prefixes for sessions, cache, and queues separately in Laravel 12 (PHP 8.4)?
We’re running a Laravel 12 application (PHP 8.4) using Redis for sessions, cache, and queues — all within a single Redis database.
'redis' => [
'client' => 'phpredis',
'options' => [
...
5
votes
1
answer
159
views
Set SQL Server LoginTimeout in Laravel
I've encountered a problem in my Laravel 12 project. I usually save my data in a remote SQL Server database, but I have to consider the case of a db server malfunction. I have a backup local ...
0
votes
0
answers
74
views
Laravel + Laragon: wrong .env being used for API requests across multiple projects
I’m working locally with Laragon and multiple Laravel projects.
The setup looks like this:
Website A → its own .env (website-a.env), with DB website_a.
Website B → its own .env (website-b.env), with ...
0
votes
1
answer
168
views
style css not working after uploading file to a server in laravel 12
I am new in laravel 12. I have a project in laravel 12. My custom CSS file is completely working in localhost after i run npm run dev, then i run npm run build to upload the project to my own server, ...
0
votes
1
answer
59
views
can not update data using select statement for where condition
I am trying to update data with where condition. I am trying to get the where condition of update statement from the select statement. But in this case the data is not updated.
public function update(...
0
votes
0
answers
29
views
SQLSTATE[HY000] [1040] Too many connections (Connection: mysql, SQL: select * from `cache` where `key` in(job_hubwale_cache_illuminate:queue:restart)) [duplicate]
occurs this error in live project hosted in contabo sesrver
i have create project in laravel12,php 8.2 & database used MySQL. this project hosted in contabo serve in this why generate this error ...
-1
votes
1
answer
118
views
Calculate the sum total of column values [duplicate]
I have a table in my blade page,
<table>
<thead>
<tr>
<th>Color</th>
<th>Total</th>
</tr>
</thead>
<tbody>
@if ...
1
vote
1
answer
34
views
Inertia routes return 404 (Not Found) for app deployed in subfolder
I have deployed a Laravel 12 + Inertia.js (React) app on a shared hosting (cPanel).
The app is located in a subfolder: https://mydomaine/app/.
Authentication routes like:
https://mydomaine/app/login
...
-1
votes
2
answers
126
views
Internal Server Error Illuminate\Contracts\Container\BindingResolutionException Target class [admin] does not exist
I'm having this error that I can't seem to resolve. I'm making a Laravel application in PHP.
The routes in the web.php file are correct. There are no errors in the controller, nor in the kernel.php ...
-2
votes
2
answers
131
views
Json response not rendering to html table, only shows raw json data [closed]
I am returning json response from index method of my controller class.
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Admin\Services\Finish;
class FinishController ...
0
votes
4
answers
179
views
Passing parameter to route function from ajax
I am trying to call a controller method using ajax. But I do not know how to do it? I have tried several ways but can not find the right one.
My controller method::
use App\Http\Controllers\Controller;...
-1
votes
1
answer
69
views
Catching errors of model in controller method
I have a controller method which I am using to change the status of the row data in the database. But I forget to mention status field in the model file. So the status was not changing in the database....
1
vote
2
answers
902
views
Laravel 12 custom Exception
I want to use different error pages for the admin panel and the frontend in Laravel 12. I created a custom exception class for this purpose, but I haven’t figured out how to activate or use it yet. ...
-1
votes
1
answer
71
views
using for loop to render image in background image [closed]
I am trying to render an image in my carousel from the database, using a for loop.
But I am stuck on how to use a for loop here, and how to render an image in style="background-image:url.
My code:...
0
votes
2
answers
86
views
create model and controllers inside specific directory
How to write artisan command to create model and controller inside specific directories.
If I do this command::
php artisan make:model Post -mcr
it create Post controller inside controllers folder, ...
0
votes
1
answer
128
views
Do I still need an Eloquent decimal cast for DECIMAL(10,6) columns in Laravel 12 / PHP 8.2?
I’m building a Laravel 12 e‑commerce site (PHP 8.2).
Product prices are stored in MySQL as DECIMAL(10,6):
base_price DECIMAL(10,6),
profit DECIMAL(10,6)
Many articles recommend adding a cast in ...
1
vote
0
answers
99
views
Schema dump not working in laravel 12 windows
I am trying to dump my mysql schema in laravel project using the following laravel artisan command but gets error on windows 10 machine. I am using windows powershell (PS).
php artisan schema:dump
# ...
0
votes
1
answer
154
views
Laravel Auditing Not Logging old_values and new_values When Using Observer
I'm working with Laravel Filament where I'm using audits package for audits the activity of laravel model. I've laravel model like:
<?php
namespace App\Models;
use App\Casts\Money;
use App\...