Loc Dai Le Loc Dai Le - 15 days ago 5x
HTML Question

Sending an email which present a blade.php with a HTML form

In Laravel 5.3 I'm sending an email which present a blade.php HTML file. Inside this blade a have a form with a action to a route which is a put. This form is to confirm something, but my form and submit button does not work when clicking in the received email.

What I have tried so far:

<form method="POST" action="http://....dk/public/api/company/{{$company_id}}/user/{{$user_id}}" accept-charset="UTF-8">
<input type="hidden" name="_method" value="PUT" />
<input type="submit" value="Acceptere invitationen fra {{$company}}">


You could just link users to the page like this

<a href="http://....dk/public/api/company/{{$company_id}}/user/{{$user_id}}"</a>

Instead of post in routes.php use get method instead. Form is not supported by a lot off mail clients. So if you target a larger audience i would suggest using the supported anchor tag.