1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Laravel 419 Page Expired, works on local

Discussão em 'Outras Linguagens' iniciado por Colem, Setembro 28, 2024 às 09:52.

  1. Colem

    Colem Guest

    I recently added a new feature to my website so that admins are able to view and delete files in storage/app/public/files/uploads

    This feature works fine in my local copy but on the live server I keep getting a 419 page expired. I searched around the web and found that the most likely cause is a missing @csrf at the start of my form but I already have this in my code.

    <form method="POST" action="{{route('dashboard.uploaddelete', $file)}}">
    @csrf
    <div class="modal-body">
    <p class="font-weight-bold">Are you sure you wish to delete {{$file}}? This action is irreversible!</p>
    <input type="hidden" name="filename" value="{{$file}}">
    </div>
    <div class="modal-footer">
    <button type="submit" class="btn btn-danger">Delete</button>
    <button type="button" class="btn btn-light" data-dismiss="modal">Cancel</button>
    </div>
    </form>


    I have tried clearing artisan cache, routes, views and config but no luck.

    Any help would be appreciated, thanks!

    Continue reading...

Compartilhe esta Página