我是laravel的新人。我尝试将复选框的所有选中值插入数据库表中一个colume,例如fixed ="> Table / Chair Arrangemen,Mike / Speaker Testing,..." 。 如果有人能解决这个问题,我感到非常感激和感激 当我尝试下面的代码时,我得到上面提到的错误
<div class="form-group">
<label class="control-label col-sm-2" for="lead">List of Stationaries</label>
<div class="col-sm-4">
<input type="checkbox" name="list_of_stationary[]" value="Table/Chair Arrangement">Table/Chair Arrangement<br>
<input type="checkbox" name="list_of_stationary[]" value="Projector Testing">Projector Testing<br>
<input type="checkbox" name="list_of_stationary[]" value="Mike/Speaker Testing">Mike/Speaker Testing<br>
<input type="checkbox" name="list_of_stationary[]" value="Laptop/Desktop">Laptop/Desktop<br>
<input type="checkbox" name="list_of_stationary[]" value="Handsout Ready">Handsout Ready
</div>
<label class="control-label col-sm-2" for="stationaries">Stationaries</label>
<div class="col-sm-4">
<input type="text" class="form-control datepicker" name="stationary_done_date" value="" placeholder="Stationaries Done Date">
</div>
</div>
我将数据存储到数据库的控制器功能是: -
public function store(StationaryRequest $request)
{
$st = new Stationary();
$st -> stationary_done_date = $request->stationary_done_date;
$st->list_of_stationary=$request->list_of_stationary
$st -> save();
return redirect()->back()->with('message','Stationary Added');
}