If you click on an url it will always be a GET method.
Since you wish to define it as DELETE, you should remake it into a post form and add
<input type="hidden" name="_method" value="delete" />
in it. Like replace:
<a href="{{ url('/categories', ['id' => $category->id]) }}">
<button class="btn btn-default">Delete</button>
</a>
with:
<form action="{{ url('/categories', ['id' => $category->id]) }}" method="post">
<input class="btn btn-default" type="submit" value="Delete" />
<input type="hidden" name="_method" value="delete" />
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>
Same goes for PUT request.
Since Laravel 5.1 method_field:
<form action="{{ url('/categories', ['id' => $category->id]) }}" method="post">
<input class="btn btn-default" type="submit" value="Delete" />
{!! method_field('delete') !!}
{!! csrf_field() !!}
</form>
Since Laravel 5.6 just with @ tag:
<form action="{{ url('/categories', ['id' => $category->id]) }}" method="post">
<input class="btn btn-default" type="submit" value="Delete" />
@method('delete')
@csrf
</form>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…