[Vuejs]-Vue.js components + Laravel right management

0👍

If you are using the blade template together with laravel gates engine to render your views, you could pack the component inside a can statement

@can('view-component', 'component-name')
  <custom-vue-component></custom-vue-component>
@endcan

Specific use regarding permission checking in blade can be found here, general authorization info here and info about the gates [here]https://laravel.com/docs/5.4/authorization#gates().

Leave a comment