Category : inertiajs

<template> <app-layout> <template #header> <h2 class="font-semibold text-xl text-gray-800 leading-tight"> Dashboard </h2> </template> <div class="py-12"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg"> <div class="mt-5 md:mt-0 md:col-span-2"> <form @submit.prevent="submit"> <div class="shadow sm:rounded-md sm:overflow-hidden"> <div class="px-4 py-5 bg-white space-y-6 sm:p-6"> <div class="grid grid-cols-3 gap-6"> <div class="col-span-3 sm:col-span-2"> <label for="course_title" class="block text-sm font-medium text-gray-700"> Title </label> ..

Read more

I actually struggling with passing data into GET request page where I trying to pass data from database to Dashboard.vue component (Using Laravel 8 + Inertia.js stack) But nothing happened, why? Controller component: public function index(Request $request) { return Inertia::render(‘Dashboard’, [ ‘percentages’ => $percentages = DB::table(‘profits’)->where(‘user_id’, $request->user()->id)->sum(‘percentage’), ‘profits’ => $profits = DB::table(‘profits’)->where(‘user_id’, $request->user()->id)->sum(‘total_profit’), ]); } ..

Read more

I’m trying to implement inertiaJS in my Laravel application which has VueJS as Frontend Framework. I’m trying to implement the authentication/login and redirecting to the authentication guard URLs, but I’m unable to do so. Below is my code: Routes: web.php Route::get(‘/’, ‘[email protected]’)->name(‘page.index’); Route::get(‘/login’, ‘[email protected]’)->name(‘login’); Route::group([‘middleware’=>[‘auth’]], function() { //For Subscriber section Route::prefix(‘my-account’)->group(function () { Route::get(‘dashboard’, ‘[email protected]’)->name(‘subscriber.dashboard’); ..

Read more

I have a button that when clicked, adds some inputs to a form: <a @click="addNewText()" class="items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:shadow-outline-gray transition ease-in-out duration-150"> <i class="far fa-2x fa-plus-square"></i> </a> I am using Laravel 8 and Inertia and want to validate my form. When I ..

Read more

I am using laravel jetstream with inertiajs and try to define an explizit route binding route: Route::get(‘resources/{resource}’, ‘[email protected]’) ->name(‘resources.show’); where my controller looks like: public function index(Resource $resource) { return Inertia::render(‘Resource’, [‘resource’ => $resource]); } If I try to open /resources/accounts, I get a blank page and the following JS error: app.js:28669 [Vue warn]: Error ..

Read more

I’m trying to re-use the Jetstream Dialog Modal, but it doesn’t seem to work. Here is the sample taken from the official docs <jet-dialog-modal :show="modal" @close="modal = false"> <template #title> Delete Account </template> <template #content> Test content </template> <template #footer> Cancel </template> </jet-dialog-modal> When I set the modal property to true and inspect the DOM, ..

Read more