Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jun 4, 2019
1 parent 6050cd4 commit 9ae651c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions README.md
Expand Up @@ -205,12 +205,6 @@ create(user)
### AJAX and Vue

```js
// app.js

Gate.prototype.before = function () {
return this.user.id == 1;
}

Vue.prototype.$Gate = new Gate;

Vue.component('posts', {
Expand All @@ -224,7 +218,7 @@ Vue.component('posts', {
};
},
template: `
<ul><li v-for="post in posts" v-if="$Gate.allow('view', post)"></li></ul>
<ul><li v-for="post in posts" v-if="$Gate.allow('update', post)"></li></ul>
<button v-if="$Gate.allow('create', 'post')">Create post</button>
`
});
Expand Down

0 comments on commit 9ae651c

Please sign in to comment.