How can i use blade directive @can inside a vue component to authorize a user?
@can('edit-post')
<button><button>
@endcan
This package doesn't do anything specific to Vue.
The answer to your question is general to Laravel/Vue.
Here are some articles to consider for learning how to bring back-end server logic to the front-end:
https://pineco.de/implementing-laravels-authorization-front-end/
https://stackoverflow.com/questions/45868924/using-laravels-gate-authorization-in-vuejs
https://vuejsdevelopers.com/2018/01/08/vue-js-roles-permissions-casl/
https://vegibit.com/how-to-use-vuejs-with-laravel-blade/
Hey guys! We get many clicks from this issue (pineco.de), so it made us convert the article to a real package. Give it a shot if you wish: https://github.com/thepinecode/policy
Most helpful comment
This package doesn't do anything specific to Vue.
The answer to your question is general to Laravel/Vue.
Here are some articles to consider for learning how to bring back-end server logic to the front-end:
https://pineco.de/implementing-laravels-authorization-front-end/
https://stackoverflow.com/questions/45868924/using-laravels-gate-authorization-in-vuejs
https://vuejsdevelopers.com/2018/01/08/vue-js-roles-permissions-casl/
https://vegibit.com/how-to-use-vuejs-with-laravel-blade/