I have 2 routes like below,
Route::get('/','MainController@Date');
Route::post('/','MainController@Date');
or
Route::any('/','MainController@Date');
When get request is called i will calculate dates and hen post request is called i will get dates from form inputs.
when post method is called in my controler
$date1 = $request->get ( 'date1' );
$date2 = $request->get ( 'date2' );
when get is called
$date1 = will calculate using date function
$date2 = will calculate using date function
How differentiate both methods get and post, if get i should one set of things and for post another set of things