Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 3 days ago
JSON representation

Handle Laravel-Vue forms and validation with ease.

Awesome Lists containing this project

README

        


vform

# Handle Laravel-Vue forms and validation with ease


Latest Version on NPM
Build Status
Total Downloads

`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.