And Here is my Testcontroller store method
public function store(Request $request)
{
dd($request->input('Question1'));
$test=new Test();
$test->Question1=$request->input('Question1');
$test->save();
flash('Test save successfully');
return redirect()->back();
}
You need to use a radio button instead. This way the browser can only submit one field and when the user clicks on another checkbox it will uncheck the current one.
<input type="radio" name="answer" value="a"> Answer A
<input type="radio" name="answer" value="b"> Answer B
<input type="radio" name="answer" value="c"> Answer C
You can then get the value like so
public function store(Request $request)
{
$answer = $request->get('answer'); // a or b or c
}