I have done the following:
<tbody style="font-family: Nunito">
@if($users)
@foreach($users as $user)
<tr class="text-right">
<th scope="row">{{$ids[$user->id]}}</th>
<td>{{$user->name}}</td>
<td>{{$user->email}}</td>
<td>{{$user->role->name}}</td>
<td>{{$dates[$user->id]}}</td>
<td class="text-left">
<a class="btn btn-sm btn-danger px-4" style="font-family: myFirstFont" href="{{route('users.destroy', $user->id)}}">Delet</a>
</td>
</tr>
@endforeach
@endif
</tbody>
When I change the parameter inside route to 'users.edit', the code inside the edit method in the controller runs.
but when I write 'users.destroy', the code inside destroy method does not run.
It does not give any error.
<form action="{{ route(users.destroy)}}" method="POST"> @method('DELETE') @csrf </form>