0
I’m getting the bug
Tokenmismatchexception in Verifycsrftoken.php (line 68)
when I submit the following view information. Detail is that in all my views I have csrf_token because of the Blade template. Anyway, this is my view:
@extends('layouts.app')
@section('content')
<div class="container">
<h1>Funções do <b>{{$user->name}}</b></h1><br>
<form action="{{url("/users/{$user->id}/roles/salva")}}" method="POST">
<div class="form-group">
<label for="exampleFormControlSelect1" class="col-md-4 control-label">Access Level</label>
<select class="form-control" id="exampleFormControlSelect1">
<option name="role_id" value="6">Viewer</option>
<option name="role_id" value="5">Manager</option>
<option name="role_id" value="3">Admin</option>
</select>
</div>
<button type="submit" class="btn btn-success">Adicionar Função</button>
</form>
<br>
<form action="/users" method="get">
<button class="btn btn-danger">Voltar</button>
</form>
</div>
@endsection
I don’t know yet if this dropdown will work but it doesn’t matter for now (I think)
@csrf in text form in view
I had done this test, but when I opened the view it ran in text form. Like, it appeared written on the @csrf screen. But I’ll try again
– João.Mistura
There is another way to declare csrf, I edited the question and put
– Wictor Chaves
OK, thanks I’ll try
– João.Mistura
It worked, thanks
– João.Mistura
Please mark the question as answered by pressing the green "v".
– Wictor Chaves
have to wait 10min
– João.Mistura