# vue-laracan

> Access laracan in Vue components

Latest version **0.1.0** (published 2018-09-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-laracan
pnpm add vue-laracan
yarn add vue-laracan
bun add vue-laracan
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-09-01 |
| First published | 2018-09-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.5 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Damian Balandowski |
| Maintainers | damianbal |

## Links

- npm: https://www.npmjs.com/package/vue-laracan
- npm.io page: https://npm.io/package/vue-laracan

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.18.0

## Recent versions

- 0.1.0 (latest) — 2018-09-01

## README

# VueLaracan

Access Laravel's Policies using [laracan](https://github.com/damianbal/laracan) in Vue components.

## Getting Started

You can access method 'can' in any Vue component, but make sure that Authorization token is sent so user is signed in.

Vue Component Example: 
```js
async mounted() {
    this.can_edit_article = await this.can('Article', 'edit', this.article_id)
}
```

### Installing

Note: Before you use this plugin in Vue project, make sure that you have installed [this](https://github.com/damianbal/laracan) package in your Laravel project.

```sh
npm i vue-laracan
```

```js
Vue.use(Laracan, {
    laravelBaseURL: "http://laravel-app.com" // url to your laravel app 
})
```

---
_Source: https://npm.io/package/vue-laracan · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
