I have a simple form which allows the User to enter from_date and to_date.Lets say a user enters 2014-09-01 and 2014-09-10 respectively. How can I get this form submit to a URL: ../from_date/2014-09-01/to_date/2014-09-10
I don't know why you would do it like this (this is very stupid imo) but you'll have to use some Javascript)
Laravel: Routes & Controller
Route::post('from_date/{fromdate}/to_date/{todate}', 'SomeController@method');
protected function method($fromdate, $todate) {
// Logic
}
Then you'll need to read the input from user with Javascript before submitting, then modify the form's action attribute and finally submit it.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community