manelgavalda-forms
v0.1.1
Published
Vue form by Manel
Downloads
4
Readme
manelgavalda-forms
Form objects pattern implementation for Javascript by Manel Gavaldà.
Installation
npm install manelgavalda-forms --save
or
yarn add manelgavalda-forms
Usage
Import package from node_modules to use it:
import Form from 'manelgavalda-forms'
Then you can create any form object using constructor:
let form = new Form( { name: 'Manel Gavaldà', email: '[email protected]', password: '123456', password_confirmation: '123456', terms: 'true' } )
Post example with form object
form.post('/register')
.then( response => {
console.log('Register done!')
})
.catch( error => {
console.log('Register error!')
})
Resources
- Form Objects at acacha.org wiki: in Catalan Language
- https://laracasts.com/series/learn-vue-2-step-by-step/episodes/19
- https://laracasts.com/series/learn-vue-2-step-by-step/episodes/20
- https://laracasts.com/series/learn-vue-2-step-by-step/episodes/21
- https://github.com/laracasts/Vue-Forms
- https://github.com/edstevo/laravel-vue-form
- https://github.com/acacha/forms