Category : inertiajs

I have a project using Laravel 8, inertia js, Vue.js and webpack. The VueJs chrome dev tools aren’t working for this project. It keeps showing as not detected, i’ve tried restarting it, removing and readding the dev tools. I’ve checked in both dev and production, no vuejs detected. Any help would be great. App.js require("./bootstrap"); ..

Read more

i want to logout the user to NON inertia url. so i have to pass the csrf token to a form with post methd. <!– Authentication –> <form method="POST" :action="route(‘logout’)" > <input type="hidden" name="_token" :value="$page.props.csrf_token"> <jet-dropdown-link colors="text-red-700 focus:bg-gray-200 hover:bg-gray-200" as="button" > logout </jet-dropdown-link> </form> but it gives me a 419 page expired response. when i ..

Read more

enter image description here page expired 419 appears when in production. I’ve tried to run php artisan clear:cache, php artisan config:cache, php artisan key:generate, and also change the SESSION_DOMAIN with the same domain, but the page still error if I deactivate the CSRF middleware it doesn’t have an error, but I can’t go to the ..

Read more

i want to redirect back with an error message in laravel. im currently using laravel 8 and inertia 0.8.2. here is what i want to do: try { $center->delete(); } catch (IlluminateDatabaseQueryException $e) { if ($e->errorInfo[0] == ‘23000’) return Redirect::back()->with(‘error’, ‘hey you cant do this bla bla…’); } and in inertia: <jet-error-message :message="error"></jet-error-message> i cant ..

Read more

I’m not sure why I am getting this error: Uncaught TypeError: Cannot redefine property: $inertia at Function.defineProperty (<anonymous>) at Object.install (app.js:108) at Function.Vue.use (app.js:233295) at Module../resources/js/app.js (app.js:246829) at __webpack_require__ (app.js:20) at Object.0 (app.js:253385) at __webpack_require__ (app.js:20) at app.js:84 at app.js:87 and this warning: Registering the Inertia Vue plugin via the "app" component has been deprecated. ..

Read more

Im using Laravel 8 with Jetstream(Inertia stack). i want to pass data to my Inertia components with view composers. how do i do that? i even tried this but doesn’t work: View::composer(‘*’, ProfileComposer::class); if you want more info here it is: <?php namespace AppProviders; use AppHttpViewComposersProfileComposer; use IlluminateSupportFacadesView; use IlluminateSupportServiceProvider; class ViewServiceProvider extends ServiceProvider { ..

Read more

I am working on a projet where it uses Laravel , ziggy ,inertia and vue. i can not use ziggy in vue as suggested by thier doc. here is my complete app.js NB i can see the expected Ziggy.js file in /js/ziggy.js //___________app.js________________ require(‘./bootstrap’) import Vue from ‘vue’ import VueMeta from ‘vue-meta’ import PortalVue from ..

Read more

I have deployed laravel react application on the server, inside a folder namely patients/ so the complete URL for the app is domain.com/patients app.js and app.css files are not found, I am facing a 404 error, because it is trying to serve files from domain.com/ instead of domain.com/patients/app.css and domain.com/patients/app.js if I change mix to ..

Read more

Taking pingcrm as an example, can a child component receive data from its corresponding controller and not only the route controller? For example, we have the routes: Route::get(‘/’, [DashboardController::class, ‘index’]) ->name(‘dashboard’) ->middleware(‘auth’) Route::get(‘contacts’, [ContactsController::class, ‘index’]) ->name(‘contacts’) ->middleware(‘remember’, ‘auth’) If I embed <Contacts /> as a child component of the Dashboard, it doesn’t receive any data ..

Read more

I installed laravel and I’m trying to use inertia with it, but when after installing it and almost getting it to work, I’m now getting this error in my console [Vue warn]: Error in render: "SyntaxError: Unexpected token u in JSON at position 0" This is my app.js file require(‘./bootstrap’); require(‘moment’); import Vue from ‘vue’; ..

Read more

I spent a lot of time to install InertiaVue and Tailwind on my new laravel 8. I have some experience with Vue.js. I used this command to install inertia composer create-project laravel/laravel nameofprojectt –prefer-dist then I added this to the root template <html> <head> <meta charset=”utf-8″ /> <meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0″ /> <link href=”{{ ..

Read more

Hi im having difficulty locating enabling browser session in laravel 8 jetstream. As per documentation, you should make sure that the IlluminateSessionMiddlewareAuthenticateSession middleware is present and un-commented in your AppHttpKernel class’ web middleware group: Then, you may use the logoutOtherDevices method provided by the Auth facade. This method requires the user to confirm their current ..

Read more

I am having a problem uploading an image from a from a form in a vue file. I tried several ways to do this but it seems the file is not properly being set. I have set "enctype="multipart/form-data" in my form tag Here is my input element: <input @change="onFileChange" type="file" accept="image/*" class="form-control" name="file" id="file" aria-describedby="helpId" ..

Read more