Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update and fix README #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ By [bubbleflat.com](https://bubbleflat.com)

This package allow to display errors from laravel validation rules

! This package needs vue-resource to work !
# Requirements
[Vue Resource](https://github.com/pagekit/vue-resource) or [Axios](https://github.com/axios/axios)

# Installation

Expand Down Expand Up @@ -56,12 +57,18 @@ export default {
}
},

methods(){
methods : {
// Error are displayed if Laravel backend return 422 Http code with name as error
this.$http.post('/submit', {name: this.name});
submit() {
// submit via vue resource
this.$http.post('/submit', {name: this.name});

// submit via axios
axios.post('/submit', {name: this.name});
}
}

}

</script>
```
```