the-post-method-is-not-supported-for-this-route-supported-methods-get-head-l
<form method="post" enctype="multipart/form-data">
@csrf
<div class="input-group mb-3">
<input type="text" class="form-control" name="username" placeholder="Instagram @username"
aria-label="Recipient's username" aria-describedby="basic-addon2">
<div class="input-group-append">
<button type="submit" id="ajaxSubmit" class="btn btn-success">Show Analytics</button>
</div>
</div>
</form>
Solution
<form method="post" enctype="multipart/form-data">
<div class="input-group mb-3">
@csrf
<input type="text" class="form-control" name="username" placeholder="Instagram @username"
aria-label="Recipient's username" aria-describedby="basic-addon2">
<div class="input-group-append">
<button type="submit" id="ajaxSubmit" class="btn btn-success">Show Analytics</button>
</div>
</div>
</form>
or
add @method('PUT') on the form
exp:
<form action="..." method="POST">
@csrf
@method('PUT')
</form>
Top comments (0)