1,296 questions
Best practices
0
votes
2
replies
41
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 ...
0
votes
0
answers
45
views
How to correctly set up Pinia with Inertia.js SSR in AdonisJS 6? Getting "getActivePinia() was called but there was no active Pinia"
I am building an application using AdonisJS 6, Vue 3, and Inertia.js. I'm trying to integrate Pinia for state management, but I'm running into an error:
I read online and see other issues here, but I ...
0
votes
0
answers
68
views
Why notification is not called when data are saved and redirected to other page?
On laravel/vue/inertiajs/element-plus site I make notification when data are saved and redirected to other page
public function update(TaskRequest $request, int $taskId)
{
\Log::info( '-1 ...
0
votes
0
answers
107
views
I got syntax error on installing typescript with laravel-data package
Reading https://spatie.be/docs/laravel-data/v4/advanced-usage/typescript docs
I try to add laravel data package on laravel/vue/element-plus site and adding app/Data/TaskAdminData.php class with code :
...
3
votes
1
answer
135
views
Getting 401 Unauthorized when calling Laravel Sanctum API after Inertia login (React + Laravel)
I'm using Laravel 11 with Jetstream (Inertia + React) and Sanctum for authentication.
Everything works fine when logging in via the default Inertia login page, but when I try to call a protected API ...
0
votes
0
answers
54
views
How selecting some select option element to run filtered request on server?
On Laravel/Vue/Element Plus, site I make filter with some filters in control and in table of Vue file :
class TaskController extends Controller
{
public function __construct()
{
}
/**...
0
votes
1
answer
64
views
How to show Laravel session flash messages in Vue component using Inertia?
I’m using Inertia.js with Vue 3, and I want to show a success message when a form is submitted successfully.
In my controller I have:
public function store(Request $request)
{
$validated = $...
0
votes
0
answers
35
views
Laravel + Imagick: Thumbnails return 0×0 images in browser despite valid 200 response
I’m building a Laravel + React (Inertia.js) application where users can upload files (PDFs, images, etc.).
For each file, I generate a thumbnail so I can display it in a gallery card (CardFile.jsx).
...
-3
votes
1
answer
123
views
Is it possible to use the "/" route for a controller in Laravel with Inertia? [closed]
What I want to set up in .\routes\web.php is something like
Route::resource('/main', CallController::class);
So, if user goes to www.sitename.com/, the index of CallController should be executed and ...
0
votes
1
answer
121
views
Getting "page over page" problem in laravel 11+ using inertia react for frontend
I have been struggling with this error for 2 weeks. Project setup is basically simple:
docker-compose for building app, redis and mariadb containers
nginx on production server for serving app and ...
0
votes
0
answers
93
views
Laravel reverb/echo useEchoPublic callback not triggering
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 ...
1
vote
1
answer
88
views
How to access asset files when using Laravel and React with Inertia?
My app uses Laravel as backend, and React as a frontend solution with Inertia as intermediary.
The idea is to load .wav files from media storage (say /storage/app/audio) to let users playback phone ...
1
vote
1
answer
43
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
...
-3
votes
1
answer
139
views
Vite manifest not found at: .../public/build/manifest.json but the manifest.json built in .../public/build/.vite/manifest.json
When running npm run dev that works but when I stop the npm run dev and run the npm run build then go to the web site, I get the error message:
Illuminate\Foundation\ViteManifestNotFoundException: ...
0
votes
2
answers
119
views
Type error using Laravel 12 React starter kit
I am using the new Laravel 12 React Starter Kit. I have a table that displays customers, at the end of each row i have a button for resending email, but im getting some type error that i dont really ...
0
votes
1
answer
170
views
Problem with types with <Form> in Inertia, React and TypeScript
I'm following the documentation (https://inertiajs.com/forms) of Inertia for custom submit button using the <Form ...> component.
It show as example:
import { useRef } from 'react'
import { Form ...
0
votes
0
answers
71
views
Translations re-render on page load
My translations on InertiaJS/React with i18next rerender when page fully loads, which ruins both SEO and animations. when page is initializing, first it loads the en language (even when I change the ...
1
vote
2
answers
80
views
Unable to validate reCAPTCHA in Laravel Jetstream with Inertia.js during login
Jetstream Version
4.0
Jetstream Stack
Inertia
Laravel Version
10.10
PHP Version
8.1
I am implementing Google RECAPTCHA v3 in Jetstream login. But its fails because inertia Jetstream auth sending 2 ...
2
votes
1
answer
60
views
Race condition when updating the form data state right before submitting the form in Laravel Inertia
Problem statement
When using the default Inertia useForm hook:
const { data, setData, post } = useForm({
idea: ''
});
I want to update the idea value and submit the form right away, ...
0
votes
0
answers
30
views
ReferenceError: route is not defined when testing component
I'm trying to test a simple Inertia.js + React component using Vitest and React Testing Library. The component uses useForm() from @inertiajs/react and the route() helper function from Ziggy (Laravel)....
0
votes
1
answer
103
views
Can't access shared props when error handling inside Laravel/Inertia application
I've followed the Inertia documentation on Error handling, but when I try to get the currently authenticated user inside the new error page it's always undefined. Not really sure why this is happening....
2
votes
0
answers
89
views
Laravel PATCH requests hanging when running on Sail
I'm using the Laravel 12 + React + Inertia starter kit. When I run the application using Sail, my PATCH requests never complete. The PATCH endpoint is being hit properly, executes the logic/DB updates,...
0
votes
0
answers
49
views
Inerta returning 302 followed by a 302 without errors
I'm using Laravel 11 with Inertia and VueJS 3. I installed Breeze on the project and tested authentication. Everything was working fine until I tested whether the invalid credentials error was ...
0
votes
2
answers
61
views
React Input loses focus after state update
I am trying to build a custom form component. In this I use inertiajs useForm hook to automatically load the data into a state (similar to react-use-form).
But my problem is, that everytime i type a ...
1
vote
1
answer
146
views
ziggy-js cannot retrieve the current route correcly while using the same route name for different HTTP methods in Laravel 12
I am new on PHP and currently I'm using Laravel 12 with InertiaJS and React, such toolkit allows me to use ziggy as a route helper and do things like:
import { RouteList } from 'ziggy-js';
type Routes=...
0
votes
0
answers
87
views
Localized routes issue with Laravel Inertia SSR apps
I want to have a seemingly simple outcome:
website in two languages with URL structure like /en/blog/article1 and /de/blog/seite1
content of the page is visible to search engines for SEO purposes
It'...
0
votes
0
answers
63
views
Error Store data with React Laravel Database Not Found
I want to store a data customer with this system, I was copy from other my system. the other system is worked fine but why this system not work as the other
FormCustomer
import { PlaceholderPattern } ...
2
votes
1
answer
294
views
Problems with `usePage()` in Inertia + Vue3 when using inertiajs/vue3
Here's the code inside my Vue component:
import { usePage } from '@inertiajs/vue3';
import { usePage as usePage2 } from '@inertiajs/inertia-vue3';
const page = usePage();
console.log('...
0
votes
0
answers
87
views
External JavaScript isn't loading on my vue3 layout
I am trying to move WordPress webpage to Laravel 12.x. I am using for that vue3 + inertia starting kit. But since I have very little experience with vue, and completely non in inertia, I bumped at ...
0
votes
0
answers
87
views
load all pages used causing slow loading page
I am using laravel + inertiajs + react to build a website. the problem is when when I go to the home, it loads all pages including the ones are not needed on Home. it is causing the page load slow.
it ...
1
vote
1
answer
179
views
File Upload with Inertia and Laravel 12 not working
I am working on using Laravel 12 Inertia and React However the file upload is not working no matter what i do anybody have any idea ? I have checked the documentation on inertiajs website for file ...
1
vote
0
answers
88
views
Laravel InertiaJS SSR returns the app.blade.php without content from server
I enabled the SSR in InertiaJS and am now facing an issue on when the SSR returns app.blade.php without .tsx file content and then renders it the client side on. It causes the "Hydration failed ...
0
votes
0
answers
66
views
laravel 12 vue inertia laragon run in ngrok
I have a problem with the Laravel 12 project that uses Vue Laragon
Then I tried to run it using Ngrok but it kept getting errors
this is the error
Removing unpermitted intrinsics
@inertiajs_vue3.js?v=...
0
votes
0
answers
47
views
'./dist/bootstrap-vue-next.mjs?' does not provide an export named 'BootstrapVueNext'
In my laravel application after i installing npm install bootstrap bootstrap-vue-next
and updating the vite.config.js :
import { BootstrapVueNext } from 'bootstrap-vue-next';
import 'bootstrap/dist/...
1
vote
0
answers
1k
views
npx shadcn-ui add calendar fails with React 19 due to [email protected] peer dependency conflict
Describe the bug
Describe the bug
npx shadcn@latest add calendar fails due to React 19 compatibility issues with [email protected]
Error Log
npx shadcn@latest add calendar
✔ Checking registry.
⠇ ...
0
votes
1
answer
218
views
Inertiajs router makes requests to web.php, how do I change that so that it will make requests to api.php?
Inertiajs router makes requests to web.php by default, how do I change that so that it will make requests to api.php by default in a Vue app.
Route::post('/api/guardian-app/m/verify-phone', [...
1
vote
1
answer
110
views
How can I host laravel ReactJS app on shared hosting
I have built my Laravel+ReactJS project, JS is written in TypeScript(.tsx), and frontend is being rendered with Inertia.
Now I have run npm run build and copied all files to the shared hosting file ...
0
votes
2
answers
381
views
How to resolve CSFR-TOKEN mismatch in Inertia.js?
CSRF-TOKEN Mismatch:
For a virtual host like app.local, when I submit a form using Inertia.js useForm().post(), it shows a 419 error in the app.
Steps to Reproduce:
I have just installed a new Laravel ...
0
votes
0
answers
43
views
(WSL UBUNTU) Laravel inertia react vite not loading in dev server
I just freshly installed laravel with inertia vite. set local server in apache2 as domain test.portfolio.com.
so there is the catch vite dev is running and with all networking setup test.portfolio.com ...
0
votes
2
answers
109
views
Method Illuminate\Auth\RequestGuard:: does not exist
The logout button doesn't work, it returns “Method Illuminate\Auth\RequestGuard::logout does not exist.” I checked everything seems to be correct, but it doesn't work.
route:
Route::middleware(["...
0
votes
1
answer
135
views
.ddev, laravel, inertia Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../"
I'm working in a Laravel, Vue.js, Inertia.js application. I'm running my app through .ddev during my work when I try to build my assets for production this error:
Uncaught TypeError: Failed to ...
0
votes
1
answer
228
views
Submit Form as array with Inertia in React
Please I am developing an application with React JS, Inertia and Laravel that require users to submit their academic qualifications. I want the user to be able to add additional form row for more ...
0
votes
2
answers
198
views
Submit a form with table rows with Vue and Inertia
Using Vue.jsm inertiaJS and Laravel.
I have a VueJS Js page on which i have a form with a table which has multiple rows. I fill each input field on those rows with data coming from the backend.
So, ...
1
vote
1
answer
197
views
Preventing Access to Login Page After Authentication in Laravel + Inertia + React (ShadCN + Breeze)
I followed ShadCN's official documentation to set up a React starter kit with Laravel Breeze. Authentication works correctly, but I encountered an issue where users could navigate back to the login ...
0
votes
1
answer
120
views
shared user in adonis inertia config is not coming into vue props
Out of the box, the adonis inertia.js config file had this section of code:
sharedData: {
user: (ctx) => ctx.inertia.always(() => ctx.auth.user),
},
But in my vue components, when I add ...
0
votes
1
answer
407
views
Is there a way to get a reactive table in Laravel 12 using Vue + Inertia + useVueTable keeping preserveState on true?
I'm trying Laravel 12 with the new starter kit Vue and the shadcn-vue components. Here is my problem: I need a reactive datatable using Inertia. To achieve that reactivity I have to disable ...
0
votes
0
answers
67
views
Inertia Js , React Problem To Handle Laravel Returned Errors
ok, I've been using inertiaJs for a little over 1 year, only it's as if
inertia can no longer receive data from the backend.
for example, here's the simple authentification form I send:
const ...
-1
votes
1
answer
106
views
How to trigger a function code once when loading or refreshing page in vue js and inertia js
I am working on a project using vue JS and inertia JS, basically I wanna trigger this
code ONCE when the page loads or reloads.
router.visit('/getrequest',{
method:'get'
})
but its triggering ...
-1
votes
1
answer
333
views
Laravel With inertiajs-react get 419 Error (Page expired)
i create project with laravel 12 and breeze & inertiajs - React mode
its Ok in localhost but when i push to production i cant send POST,PATCH,DELETE request get error: 419 Page Expired
i send ...
0
votes
1
answer
76
views
Why async inertiajs request from js code does not work?
I have Laravel 11 / vuejs 3 / element-plus 2.9.5" app I make request to save form as from my vue file :
const onSubmit = () => {
console.log(editMode.value)
if (editMode....