Try to change {{ csrf_field() }} to this {!! csrf_field() !}}
Problem with CSRF - VerifyCsrfToken.php line 67
Hello,
I am trying to submit a simple form :
<div class="row">
<form name="article" method="POST" action= "/ASweb/public/articles/{{$article->id}}">
{{--@Todo: FIND OUT WHY IS THIS NEEDED?!!--}}
{{ csrf_field() }}
{{ method_field('PATCH') }}
<div class="col-md-4">
<textarea name="description" class="form-control">{{$article->description}}</textarea>
</div>
<div class="col-md-8">
<button type="submit" class="btn btn-primary">Save</button>
</div>
</form>
</div>
But I am always getting the following error message:
TokenMismatchException in VerifyCsrfToken.php line 67:
As you can see I have already included the {{ csrf_field() }}. I did this as I read that it will fix this issue and the correct token will be matched. But the problem persists. I am trying to do a post that I convert to a patch as suggested in the "Laravel from scratch" lectures and then I simply want my controller to update the fields and return to the page. Nothing special.
Any hints are appreciated! THANKS! :-)
I have solved the issue. I was having a wrong path in the link and hence the mismatch exception!
Please or to participate in this conversation.