diff --git a/README.md b/README.md index 074c087..e76b91b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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}); + } } } -``` \ No newline at end of file +```