Questions tagged [inertiajs]

Inertia.js offers developers the ability to create single-page applications (SPAs) by utilizing traditional server-side routing and controllers. This unique feature seamlessly integrates the backend with the frontend, eliminating the need for writing APIs. With a choice of reliable server-side frameworks like Laravel, Ruby on Rails, Django, and AspNetCore, developers have flexibility in their development process. They can also leverage popular client-side frameworks such as React, Svelte, or Vue to craft engaging user interfaces.

What is the best method for implementing pagination in Larvael with React using Inertia?

Is there a way to paginate in react using inertia with laravel? When pulling paginated data, I use the following code: $contacts = Contact::orderBy('name', 'asc')->paginate(10); return Inertia::render('Contacts/index', [ 'contacts' => $contacts ] ...

Inertia: Refresh the page with new data without altering the current scroll position

In my application using Inertia/Laravel/VueJs, I have a page displaying numerous posts where each post can be marked as completed. Upon marking a post as completed on the front-end, a CSS class should toggle to indicate completion. The desired behavior is ...

What is the technique for including a parameter in an Inertia lazy loading call?

When the initial page loads, specific products are loaded. However, I am looking to load missing products partially based on a foreign key. To achieve this, my idea is to return two props from my Laravel controller. These props are 'products' and the lazy ...

Inertiajs - Seamlessly transition to a different page within the same environment

Is there a way to navigate between pages on the client side in Laravel and InertiaJS without using inertia.visit()? I am curious about how to switch pages solely within the client, without having to communicate with the server. Can props be specified fro ...

Provide property to enduring design

I need help with sending the 'products' prop to my persistent layout in order for it to display the products in the search field and filter them correctly. How can I achieve this? Thank you! app.js ... import MainLayout from &quo ...

Optimal method for managing user session data in Vue with the power of Laravel and Inertia

I am creating an application that features a dynamic menu using Laravel, Vue, and Inertia. To transmit the session details about the menu items to be displayed (such as icons) and user information (like avatar and name), I currently rely on the HandleIner ...

Having trouble getting a JS file to work with the Laravel Inertia.js and Vue.js3 template

Just getting started with inertia.js and facing an issue. My CSS styles are being applied, but my JavaScript file isn't functioning as expected. I'm working on an admin dashboard using Laravel 9 and vue.js-3 with a custom HTML template. Interes ...

Encountering an issue while trying to create a Vue3 Vite application because of the assignment of a read-only property 'name

I am facing an issue with my Laravel app that utilizes Vite, Vue3, and Inertiajs. Previously, I was able to build it successfully. However, now I encounter the following error: Cannot assign to read only property 'name' of function '(userOptions) => { ...

What causes the white screen issue when utilizing Inertia in Laravel for page rendering?

The technologies I'm working with are: Laravel, Inertiajs, and Vue.js. Although I am new to using Laravel, I encountered an issue when running composer require laravel/breeze --dev and php artisan breeze:install vue which resulted in my Laravel proj ...

Error in Laraval Breeze: Vue component is missing page or props definition

Hey there, I'm currently working on developing a web application using the Laravel Breeze framework which incorporates Laravel, Vue.js, and Inertia.js. I've made significant progress so far, but I'm encountering an issue with utilizing the data passed fr ...

Instructions for utilizing "hasPermissionTo" within a Vue template

I am struggling with my code and I am unsure how to utilize hasPermissionTo in a Vue template to verify if a role has permission to perform a certain action. <script setup> import { Link } from "@inertiajs/inertia-vue3" import { defineProps ...

Having trouble with submitting a form using Laravel, Vue, and Inertia?

I encountered an issue with Laravel Vue Inertia while using Bazar from GitHub. Everything was working fine until I attempted to create a new page called Voucher, which was essentially a replica of the Categories page. However, when I tried to create a new ...

The dynamic trio of Laravel, inertiajs, and vuejs

I am currently working on a project that involves laravel, inertiajs, and vuejs. Whenever I attempt to delete a user from the database, I consistently encounter a 404 | NOT FOUND error. My goal is to successfully delete the user by clicking a button using ...

Encountering an issue in Laravel 8 JetStream: Mix file '/css/app.css' cannot be found when running npm run prod

I have a Laravel 8 application set up with Jetstream, Inertia Js, and VueJs 3. When I execute: npm run prod An error occurs: Exception Unable to find Mix file: /css/app.css. (View: /var/www/html/mysite/resources/views/app.blade.php) http://subdomain.mysi ...

Steps for deploying updates from a Laravel + Inertia + Vue3 application to a production server

I have been working on a project for a client, making changes to Vue and SCSS files. I need to deploy these changes to the live server, which is hosted on Digital Ocean with server-side rendering enabled. "private": true, "scripts& ...

Having an issue with my Vue page where it is attempting to send a request twice. My tech stack includes inertia, Laravel, and

<template> <app-layout title="Dashboard"> <template #header> <h2 class="h4 font-weight-bold">Create</h2> </template> <div class="container mt-5 text-gray-300"> ...

How can I send an error message from a Laravel controller and handle it in InertiaJS using the form helper?

I am facing an issue where I need to handle errors in the controller, but they are not Laravel validation errors. This prevents me from accessing them using the inertiajs form helper without using props.errors. How can I return the error in a way that allo ...

Laravel - Jetstream with InertiaJS: Implementing guards in the main header menu of AppLayout.vue

Is there a way to utilize guards for adding a specific admin menu entry using guards? I am aware that passing guard-"data" from controllers to view is possible as mentioned in the documentation: class UsersController extends Controller { public functio ...

Importing dynamic components in Vue with Vite is a seamless

Currently in the process of migrating an existing Laravel inertia project from Mix to Vite. Followed all the steps in the migration guide and everything is functioning properly except for one issue. I have a component that receives a prop containing an a ...

In Laravel, Inertia.js will automatically close a modal if there are no validation errors present

Here is the method I am currently using: methods: { submit() { this.$inertia.post('/projects', this.form); this.openModal = false; }, }, Unfortunately, this method closes the modal even if there are validation erro ...

Attempting to embed a script tag within an Inertia and Vue component

Can anyone help me with SSR rendering Schema data for my blog post using a Vue/Inertia component template? When I attempt to render the data, I encounter the following error: [plugin:vite:vue] Tags with side effect (<script> and <style>) are i ...

Utilize Vue.js 3 and InertiaJs to Retrieve Session Information in Laravel 9

I am currently working on my initial Laravel project, incorporating Vuejs for the frontend. One of the key features of my application is allowing a Super admin to log in as a User (impersonate). By clicking on the Impersonate Button, the word impersonate g ...

Is there a way for me to gain entry to this array in vuejs?

Can anyone help me with accessing the objects in this array? I am using laravel, inertiajs, and vuejs. I am passing a variable from a laravel controller to a vuejs component with inertia.js. https://i.stack.imgur.com/p7yjL.png https://i.stack.imgur.com/y ...

Troubleshooting Problem with Laravel Inertia and Ziggy Link Routing

I’m currently experiencing an issue with my routing. The problem arises in the following scenario: When there is no id query, Inertia functions as expected. https://i.stack.imgur.com/r14bt.png However, after navigating to edit mode and attempting to c ...

Using Laravel for login with the option to choose from multiple usernames

I am looking to enhance my Laravel VueJS application by allowing users to log in using their username and registration number instead of just an email. I have successfully implemented this functionality by modifying the username function within the Authent ...