📅  最后修改于: 2022-03-11 14:54:29.705000             🧑  作者: Mango
//You should write a value in the checkbox and then check if that value is null or not:
//HTML, in form:
//PHP, in controller:
$isChecked = $request->check != null;
//If the checkbox is checked, then the $request->check will not be null. Otherwise, it will.
//Then the $isChecked variable will be true if the checkbox is checked, and false if it isn't.