我想从数据库设置复选框状态,所以我写,
{{ Form::checkbox('asap', null, $offer->asap) }}
Run Code Online (Sandbox Code Playgroud)
但是如果我想将id设置为复选框之类的话
{{ Form::checkbox('asap', null, $offer->ASAP, array('id'=>'asap')) }}
Run Code Online (Sandbox Code Playgroud)
它始终将我的复选框状态设置为true.(在用户选择之前)
那么问一下在用户选择它之前如何设置复选框状态,如何在刀片复选框中设置ID?
我的雄辩模型有一些问题,我尝试将两个不同的表合二为一
现在我有两张桌子.
第一个表名为"company_saved_cv"
|id|company_id|worker_id |
--------------------------
|1| 2 | 61 |
|3| 3 | 66 |
|4| 2 | 69 |
--------------------------
Run Code Online (Sandbox Code Playgroud)
第二个表名为"工人"
|id|location|name_and_surname|
------------------------------
|61|London | John John |
|62|London | John John |
|66|London | John John |
|67|London | John John |
|68|London | John john |
Run Code Online (Sandbox Code Playgroud)
而我也是这样的表.
|id|location|name_and_surname|worker_id|
---------------------------------------|
|61|London | John John | 61 |
|62|London | John John | NULL |
|66|London | John John | 66 |
|67|London | John John | NULL …Run Code Online (Sandbox Code Playgroud)