Created
April 7, 2018 09:59
-
-
Save tisuchi/6e3cd8876f578a8fc7108116b840d871 to your computer and use it in GitHub Desktop.
Laravel Vue-Resource pass parameter in Get Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
this.$http.get('api/products', {params: {page: page}} ).then( | |
function (response) { | |
//look into the routes file and format your response | |
this.$set('items', response.data.data.data); | |
this.$set('pagination', response.data.pagination); | |
}, function (error) { | |
// handle error | |
} | |
); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment