Skip to content

Instantly share code, notes, and snippets.

@tisuchi
Created April 7, 2018 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tisuchi/6e3cd8876f578a8fc7108116b840d871 to your computer and use it in GitHub Desktop.
Save tisuchi/6e3cd8876f578a8fc7108116b840d871 to your computer and use it in GitHub Desktop.
Laravel Vue-Resource pass parameter in Get Method
<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