https://github.com/cretueusebiu/vform
Handle Laravel-Vue forms and validation with ease.
https://github.com/cretueusebiu/vform
form laravel vue vue-components
Last synced: 7 months ago
JSON representation
Handle Laravel-Vue forms and validation with ease.
- Host: GitHub
- URL: https://github.com/cretueusebiu/vform
- Owner: cretueusebiu
- License: mit
- Created: 2016-07-02T06:48:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-06-17T08:28:15.000Z (over 3 years ago)
- Last Synced: 2025-05-12T16:14:51.046Z (7 months ago)
- Topics: form, laravel, vue, vue-components
- Language: TypeScript
- Homepage: https://vform.vercel.app
- Size: 1.01 MB
- Stars: 604
- Watchers: 21
- Forks: 120
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vue - vform - Handle Laravel-Vue forms and validation with ease. ` 📝 13 days ago` (UI Utilities [🔝](#readme))
- awesome-vue - vform - A simple way to handle Laravel back-end validation in Vue. (Components & Libraries / UI Utilities)
- awesome-vue - vform - A simple way to handle Laravel back-end validation in Vue. (UI Utilities / Form)
README
# Handle Laravel-Vue forms and validation with ease
`vform` is a tiny library for Vue 2/3 to help with forms and validation when using Laravel as a back-end.
It provides a form instance to wrap your data in a convenient way and send it to your Laravel application via an HTTP request using `axios`.
## Installation
```bash
npm install axios vform
```
## Basic Usage
```html
Log In
import Form from 'vform'
export default {
data: () => ({
form: new Form({
username: '',
password: ''
})
}),
methods: {
async login () {
const response = await this.form.post('/api/login')
// ...
}
}
}
```
__Laravel Controller:__
```php
validate($request, [
'username' => 'required',
'password' => 'required',
]);
// ...
}
}
```
## Documentation
You'll find the documentation on [vform.vercel.app](https://vform.vercel.app).
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.