dimanche 31 janvier 2016

@cannot statement from Blade engine not working

I'm trying to use @cannot in my template but I have the following issue. With the code:

@section('content')
    @can('upload-images',$flyer)
        <form action="{{ URL::to('/') }}/{{ $flyer->zip }}/{{ $flyer->street }}/photos" method="POST" class="dropzone" enctype="multipart/form-data">
            {{ csrf_field() }}
        </form>
    @endcan
    @cannot
        <p>Not allowed</p>
    @endcannot
@stop

@cannot throws the following error:

Undefined class constant 'denies'

I know @cannot exists and also that uses Gate::denies, which is the error I'm taking, here is the Github commit where the magic should occur:

http://ift.tt/1P5xB2t

Any clues? Thanks!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1nWafWv
via IFTTT

Aucun commentaire:

Enregistrer un commentaire