vue-permission-inertia
v1.0.6
Published
A Package for vue to receive and check permissions
Maintainers
Readme
Vue Permission Inertia
This package helps you to retrieve permissions from your laravel application with Inertia.js as dependency.
Requirements
- Vue3
- Inertia.js
Setup
Install the package
npm i vue-permission-inertiaBasic Usage
can
<span v-can="'myPermissionIWantToCheck'"></span>
Or as property
<span v-if="$can('myPermissionIWantToCheck')"></span>Checks if the user has this permission.
canAny
<span v-canAny="['myPermissionIWantToCheck', 'mySecondPermissionIWantToCheck']"></span>
Or as property
<span v-if="$can('myPermissionIWantToCheck', 'mySecondPermissionIWantToCheck')"></span>This checks if the user has at least one permission.
canAll
<span v-canAny="['myPermissionIWantToCheck', 'mySecondPermissionIWantToCheck']"></span>
Or as property
<span v-if="$canAll('myPermissionIWantToCheck', 'mySecondPermissionIWantToCheck')"></span>This checks if the user has all provided permissions.
