Skip to content

Instantly share code, notes, and snippets.

@lagagain
Last active July 1, 2019 14:49
Show Gist options
  • Select an option

  • Save lagagain/14dc02a4518fdae1469ae7f163862c3a to your computer and use it in GitHub Desktop.

Select an option

Save lagagain/14dc02a4518fdae1469ae7f163862c3a to your computer and use it in GitHub Desktop.
[Simple Example] Laravel Receive Multiple value
<form action="">
<input name="select[]" type="checkbox" value="01"/>
<input name="select[]" type="checkbox" value="02"/>
<input name="select[]" type="checkbox" value="03"/>
<input name="select[]" type="checkbox" value="04"/>
<input name="select[]" type="checkbox" value="05"/>
<input name="pick_one" type="radio" value="01"/>
<input name="pick_one" type="radio" value="02"/>
<input name="pick_one" type="radio" value="03"/>
<input name="pick_one" type="radio" value="04"/>
<input name="pick_one" type="radio" value="05"/>
<input name="" type="submit" value=""/>
</form>
<?php
Route::get('/form', function (\Illuminate\Http\Request $request) {
\Illuminate\Support\Facades\Log::info($request->all());
return view("form");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment