jeudi 22 avril 2021

How to implement Gate/Policy @can method in laravel blade to a view component

I had implemented a Review policy using @can method in my blade.

DisplayProduct.blade

@extends('layouts.app')
@section('content')

<display-product :product="">
</display-product>

@endsection

But now I wanted to convert my blade component to vue component, so exactly how can I implement My review policy in the vue component

DisplayProduct.vue Component Snippet

            <div class="row">
                <div class="review-content ml-3 my-3"></div>
       <!-- @can method from laravel -->
                @can('delete',$review)
                some code .........
                @endcan
            </div>


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3v6VnXZ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire