[Vuejs]-Pass data to edit from the controller to the view in a many to many relationship

0👍

You can load the relation with the load() method and just return the $turno variable that will contain the "turno" and the "dias".

public function edit(Turno $turno) {
    $turno->load('dias');

    return Inertia::render('Turnos/Editar', [
        'turno' => $turno
    ]);
}

On the client side you can use v-model to fill your inputs.

Leave a comment