Last active
October 16, 2019 20:22
-
-
Save lagbox/fb65adb4331a61bc4a0714b62ecac678 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="test?test=query" method="post"> | |
@csrf | |
<input type="hidden" name="test" value="post" /> | |
<input type="submit" value="blah" /> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::view('test', 'test'); | |
Route::post('test', function (Illuminate\Http\Request $request) { | |
dd([ | |
'input' => $request->input('test'), | |
'get' => $request->get('test'), | |
'all' => $request->all(), | |
]); | |
}); | |
/* | |
array:3 [▼ | |
"input" => "post" | |
"get" => "query" | |
"all" => array:2 [▼ | |
"_token" => ... | |
"test" => "post" | |
] | |
] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment