<input type="date" class="form-control" name="from" value="{{ date('Y-m-d') }}"> <input type="date" class="form-control" name="to" value="{{ date('Y-m-d') }}"> <a href="{{ url("/totalsales/{{ }}") }}"></a>
i want to send ‘from’ and ‘to’ to controller from blade. how to write that in the tag. the necessary code is mentioned above. Thanks for your help in advance.
Advertisement
Answer
<form method="post" action="{{ URL("/totalsales/") }}"> <input type="datetime-local" class="form-control" name="from" > <input type="datetime-local" class="form-control" name="to" > <input type="submit" class = "btn btn-primary">
this is the method to send data in controller your route should be post .