正在使用的是laravel 5.2,我知道怎么接收text,email, select, radio, textarea等,并把它们保存到数据库,但是不知道怎么接收和保存一组checkbox到数据库。
比如下面这个例子:
{!! form::open(array('url' => 'foo/bar')) !!} email address we'll never share your email with anyone else. password example select 12345example multiple select 12345example textarea file input this is some placeholder block-level help text for the above input. it's a bit lighter and easily wraps to a new line. option one is this and that—be sure to include why it's great
option two can be something else and selecting it will deselect option one
option three is disabled
1 2 3
submit {!! form::close() !!}
回复内容: 正在使用的是laravel 5.2,我知道怎么接收text,email, select, radio, textarea等,并把它们保存到数据库,但是不知道怎么接收和保存一组checkbox到数据库。
比如下面这个例子:
{!! form::open(array('url' => 'foo/bar')) !!} email address we'll never share your email with anyone else. password example select 12345example multiple select 12345example textarea file input this is some placeholder block-level help text for the above input. it's a bit lighter and easily wraps to a new line. option one is this and that—be sure to include why it's great
option two can be something else and selecting it will deselect option one
option three is disabled
1 2 3
submit {!! form::close() !!}
使用name=check[ ]
这样接收的就是一个数组