TokenMismatchException in VerifyCsrfToken.php line 67 on laravel using ajax
问题 This view has a link which calls a javascript function @extends('layouts.main') @section('content') <table class="table"> <tr> <th>ID</th> <th>Nombre</th> <th>Opción</th> </tr> @foreach ($tasks as $task) <tr> <td>{{$task->id}}</td> <td>{{$task->name}}</td> <td><a href="javascript:void(0)" onclick="eliminar({{$task->id}})" class="btn btn-danger">Eliminar</a></td> </tr> @endforeach </table> @stop and here is the javascript code function eliminar(id){ $.ajax({ type: "DELETE", url: "task/"+id,