Loc Dai Le Loc Dai Le - 1 year ago 98
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}}">

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download