{ data.get(route('na" /> { data.get(route('na" /> { data.get(route('na"/>

Laravel Inertia.js Vue get request infinite loop

21 Views Asked by At

Vue3

import {useForm} from "@inertiajs/vue3";

const data = useForm({
    user_id: 1, token: 'z3xppkdo0CLoFxy'
});

onBeforeMount(() => {
    data.get(route('navigation'));
})

Laravel

public function __invoke()
{
   return redirect()->back()->with(['data' => 'some data']);
}

the Navbar component needs to get the data (its not page)

0

There are 0 best solutions below