Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

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="...
pileup's user avatar
  • 3,462
-1 votes
0 answers
86 views

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 ...
Kevin Waterson's user avatar
0 votes
1 answer
104 views

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 ...
Keso's user avatar
  • 101
0 votes
1 answer
85 views

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 ...
Kevin Waterson's user avatar
Best practices
0 votes
1 replies
37 views

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 ==...
Denys Siebov's user avatar
0 votes
0 answers
37 views

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/...
pileup's user avatar
  • 3,462
0 votes
0 answers
21 views

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....
pileup's user avatar
  • 3,462
0 votes
1 answer
66 views

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 ...
pileup's user avatar
  • 3,462
Advice
0 votes
0 replies
48 views

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 ...
Shashi Kelum's user avatar
Advice
0 votes
5 replies
148 views

In Laravel 10, we had a RouteServiceProvider class that handled loading up all your different routes. This is a snippet from that file in an older project I worked on using Laravel 10: ...
Praise Dare's user avatar
1 vote
2 answers
182 views

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 ...
Meaulnes's user avatar
  • 553
0 votes
1 answer
84 views

I have upgraded a Lravel 10 app to the latest Laravel 12.36.1. On the Laravel 10 app I have an Ajax call in the backoffice to put the project down or up that calls a method setMaintenanceMode(string $...
McRui's user avatar
  • 2,021
2 votes
1 answer
111 views

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 ...
McRui's user avatar
  • 2,021
2 votes
1 answer
139 views

I have an Order model that has a many-to-many relation to the Product model: class Order extends Model { //... public function products(): BelongsToMany { return $this->...
Marleen's user avatar
  • 2,916
3 votes
0 answers
101 views

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/{...
20cnts's user avatar
  • 21
0 votes
1 answer
64 views

I am using Ubuntu 24.04 and a LEMP stack and vite to host a Laravel 12 application. I am deploying with deployer and running npm run build on the server. Occasionally, I get hit with what seems to be ...
wruckie's user avatar
  • 1,821
0 votes
1 answer
73 views

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' => [ ...
alexmcfarlane's user avatar
0 votes
0 answers
24 views

I try to listen to ConversionHasBeenCompletedEvent to delete the original image after the conversion has been completed, but this event did not trigger in my listener. I'm using spatie laravel-...
TDM's user avatar
  • 1
5 votes
1 answer
169 views

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 ...
iLux24's user avatar
  • 85
0 votes
0 answers
33 views

I'm working on a routing system where I need to conditionally prefix all existing routes based on the user's currency. The logic should follow these rules: If the user's currency is INR, prefix all ...
Srinivas V's user avatar
0 votes
0 answers
77 views

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 ...
JJuless's user avatar
  • 147
0 votes
1 answer
58 views

i have a project in laravel 12 vita, i installed jquery via npm npm install jquery --save-dec. in navbar layout it shoud display the Languages dropdown using mcamara pakage. The problem is the ...
user2419119's user avatar
0 votes
1 answer
176 views

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, ...
user2419119's user avatar
0 votes
0 answers
56 views

In my Laravel 12 application. This code deletes entire set of logs (related to that app) without skipping: $app->logs()->orderBy('timestamp_ms', 'desc')->skip(2)->delete(); While this ...
Junaid's user avatar
  • 488
0 votes
1 answer
59 views

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(...
user4221591's user avatar
  • 2,236
0 votes
0 answers
62 views

I’m building a multi-tenant SaaS application with Laravel 12 using the database queue driver. Problem Each tenant should have its own isolated queue so that one tenant’s heavy background jobs don’t ...
Prakash Tank's user avatar
0 votes
0 answers
29 views

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 ...
dharmendra hubwale's user avatar
0 votes
0 answers
94 views

I have a feeling I'm doing something very stupid but I cannot get the callback on useEchoPublic to fire no matter what I try The event is structured like so, this is pulled straight from the browser ...
AntlerFox's user avatar
  • 180
-1 votes
1 answer
119 views

I have a table in my blade page, <table> <thead> <tr> <th>Color</th> <th>Total</th> </tr> </thead> <tbody> @if ...
user4221591's user avatar
  • 2,236
1 vote
0 answers
30 views

I’m using Laravel 12 and I want to run a scheduled command every day at 07:00 UK (Europe/London) time, but my server is configured with UTC timezone. In my bootstrap/app.php I have and its working: $...
Ashwini Singh's user avatar
1 vote
1 answer
43 views

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 ...
kamal ennaji's user avatar
1 vote
1 answer
74 views

I am trying to post my form data using ajax. I am serializing the form data before posting. But at the controller method, it shows null. There is no problem with the form data because I can pass data ...
user4221591's user avatar
  • 2,236
-1 votes
2 answers
128 views

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 ...
utente1234567890's user avatar
0 votes
2 answers
89 views

$transactionsData is an array, and I want the id from transaction id from the transaction model for each item and assign it to the details to insert the id to the transaction item table, how can I ...
swatantra's user avatar
  • 493
-2 votes
2 answers
132 views

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 ...
nischalinn's user avatar
  • 1,284
1 vote
1 answer
123 views

I'm working on a Laravel 12 project using XAMPP on Windows 10. I tried to use the following command to create the symbolic link for serving uploaded files: php artisan storage:link But the public/...
Satria Indra Mulyana's user avatar
0 votes
4 answers
180 views

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;...
nischalinn's user avatar
  • 1,284
0 votes
1 answer
118 views

I have a dropdown list, here in the option I want to load image also. I took reference from: i want to display image in select option dynamically but not working But the image is not loading. The path ...
nischalinn's user avatar
  • 1,284
-1 votes
1 answer
69 views

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....
nischalinn's user avatar
  • 1,284
1 vote
2 answers
103 views

I am using Laravel V:12 and Spatie Role/Permission V:6. for multiple roles (super_admin, sub_admin, user, sub_user). I created one seeder for creating an admin user and its role/permission. At the ...
Rajan Rathod's user avatar
1 vote
2 answers
961 views

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. ...
Tuğran Demirel's user avatar
0 votes
2 answers
65 views

I have 10 items in my database table. I want to apply same CSS style to the divs in the arithmetic sequence of 3 items. For example, items [0, 3,6,9] will have CSS style slideInDown, items [1,4,7] ...
user4221591's user avatar
  • 2,236
-1 votes
1 answer
75 views

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:...
nischalinn's user avatar
  • 1,284
1 vote
1 answer
274 views

I created a new Laravel 12 application following the Installation guide. The project is generated correctly and I ran all migrations. When I run php artisan --version I get: Laravel Framework 12.20.0 (...
Samball's user avatar
  • 879
0 votes
2 answers
86 views

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, ...
nischalinn's user avatar
  • 1,284
1 vote
1 answer
53 views

I am trying to retrieve category (id, category_name, status) table data using where condition and sort in descending order for id. I am writing query like:: public function category() { $...
nischalinn's user avatar
  • 1,284
0 votes
1 answer
133 views

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 ...
Lana Hanna's user avatar
1 vote
1 answer
52 views

My datatable is working fine, all the features like pagination, sorting, searching are working with static table data content. But when I fetch data from database and render in datatable features like ...
user4221591's user avatar
  • 2,236
1 vote
0 answers
100 views

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 # ...
shah sawood's user avatar
1 vote
2 answers
557 views

I'm doing an online course to learn Laravel, and I have decided to follow it using the latest version of Laravel. The person on the videos uses an older version of Laravel, so obviously some of the ...
Adrian2895's user avatar