<form action="{{ route('friends.store', $user) }}" method="POST">
@csrf
@method('POST')
<button type="submit"
class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">
Add friend
</button>
</form>
when i press the button, the user ID is added to the GET parameters even though the form makes a post request. The user is also empty when i check the value inside the controller. It is just an empty User model. I have no idea what is going wrong because I have a delete form that seems to be the same form but that one works.
<form action="{{ route('friends.destroy', $user) }}" method="POST">
@csrf
@method('DELETE')
<button type="submit"
class="bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded">
Remove friend
</button>
</form>