This file contains hidden or 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
| let mix = require("laravel-mix"); | |
| let tailwindcss = require("tailwindcss"); | |
| let glob = require("glob-all"); | |
| let PurgecssPlugin = require("purgecss-webpack-plugin"); | |
| /** | |
| * Custom PurgeCSS Extractor | |
| * https://github.com/FullHuman/purgecss | |
| * https://github.com/FullHuman/purgecss-webpack-plugin | |
| */ |
This file contains hidden or 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
| import { AbilityBuilder, Ability } from 'casl' | |
| // Alternatively this data can be retrieved from server | |
| export default function defineAbilitiesFor(user) { | |
| const { rules, can } = AbilityBuilder.extract() | |
| can('read', 'User') | |
| can('update', 'User', { id: user.id }) | |
| if (user.role === 'doctor') { |
OlderNewer