<form @submit.prevent="addFriend">
<button class="inline-flex items-center px-4 text-white text-sm rounded-md">Ekle</button>
</form>
İçinde buton olan bir formum var ve inertia form helperi ile Useform kullanarak bunu post etmeye çalışıyorum
<script setup>
import { useForm } from '@inertiajs/vue3';
const props = defineProps(['profile'])
const form = useForm({
user: props.profile,
});
const addFriend = () => {
form.post(route('friends.store', props.profile.id), {
preserveScroll: true,
onSuccess: () =>{},
});
};
</script>
ve
Request URL:
http://127.0.0.1:8000/user/friends/1
Request Method:
POST
Status Code:
500 Internal Server Error
Remote Address:
127.0.0.1:8000
Referrer Policy:
strict-origin-when-cross-origin
nereyi kaçırıyorum ?