I'm working with laravel 5.7 and vue.js, with shinobi package, I'm restricting the users access.
When I try to hide button (new button), to create categories which one is in Categoria.vue component, but doesn't recognize the helper @can
Code for web.php: My route
I hope you can help me
Code for web.php: My route
Route::middleware(['auth'])->group(function(){
//CATEGORIAS
route::post('/categoria/registrar', 'CategoryController@store')->name('categoria.registrar')
->middleware('permission:categoria.registrar');
.........
}
Code of Categoria.vue component
Div (here is the button):
<div class="card-header">
<i class="fa fa-align-justify"></i> Categorías
@can('categoria.registrar')
<button type="button" @click="abrirModal('categoria', 'registrar')" class="btn btn-secondary">
<i class="icon-plus"></i> Nuevo
</button>
@endcan
</div>
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2wxZwrF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire