Reputation: 367
So i've got a form on my page /post-form The /post-form page also has parameters in it's URL like this /post-form?token={randomtoken}
I want it so that when I click on the submit button on the form I get the value of the token parameter. My route looks like this
Route::post('/post-form', 'PostFormController@post')->name('post');
This is the action that happens when I click on the submit button on the form. Does anyone know how to get the token parameter in the post function in my PostFormController?
Upvotes: 0
Views: 238
Reputation: 3689
public function post(Request $request){
$token =$request->query('token');
}
you can see more requests Laravel Docs
Upvotes: 0