first commit

This commit is contained in:
Ariyutta
2026-08-07 10:47:09 +07:00
commit 1c094fbe7f
11630 changed files with 1580900 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
## Inertia v1 + Vue Forms
- For form handling in Inertia pages, use `router.post` and related methods. Do not use regular forms.
@verbatim
<code-snippet name="Inertia Vue Form Example" lang="vue">
<script setup>
import { reactive } from 'vue'
import { router } from '@inertiajs/vue3'
import { usePage } from '@inertiajs/vue3'
const page = usePage()
const form = reactive({
first_name: null,
last_name: null,
email: null,
})
function submit() {
router.post('/users', form)
}
</script>
<template>
<h1>Create {{ page.modelName }}</h1>
<form @submit.prevent="submit">
<label for="first_name">First name:</label>
<input id="first_name" v-model="form.first_name" />
<label for="last_name">Last name:</label>
<input id="last_name" v-model="form.last_name" />
<label for="email">Email:</label>
<input id="email" v-model="form.email" />
<button type="submit">Submit</button>
</form>
</template>
</code-snippet>
@endverbatim