Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用laravel中的复选框打开/关闭开关_Php_Html_Laravel - Fatal编程技术网

Php 使用laravel中的复选框打开/关闭开关

Php 使用laravel中的复选框打开/关闭开关,php,html,laravel,Php,Html,Laravel,Hi friend’s我是laravel 5.1中的新手如何使用laravel 5.1中的开/关开关盒, 我试过这个: <div class="col-xs-12"> {!! Form::label('pluss_customer', trans('noorsi.customer.pluss_customer'), array('class' => 'col-xs-12 col-sm-5 col-md-4 col-lg-3 cmn-toggle

Hi friend’s我是laravel 5.1中的新手如何使用laravel 5.1中的开/关开关盒, 我试过这个:

<div class="col-xs-12">
                {!! Form::label('pluss_customer', trans('noorsi.customer.pluss_customer'), array('class' => 'col-xs-12 col-sm-5 col-md-4 col-lg-3 cmn-toggle cmn-toggle-round control-label')) !!}
                <div class="col-xs-12 col-sm-5 col-md-6 col-lg-7">
                {!! Form::checkbox('pluss_customer',1,@$customer->pluss_customer, array('class'=>'cmn-toggle cmn-toggle-round','id'=>'pluss_customer', 'name'=>'pluss_customer')) !!}
                </div>
                </div>
and my css code :
input.cmn-toggle-round + label {
  padding: 2px;
  width: 100px;
  height: 30px;
  background-color: #dddddd;
  -webkit-border-radius: 30px;
  -moz-border-radius: 30px;
  -ms-border-radius: 30px;
  -o-border-radius: 30px;
  border-radius: 30px;
}
input.cmn-toggle-round + label:before, input.cmn-toggle-round + label:after {
  display: block;
  position: absolute;
  top: 1px;
  left: 1px;
  bottom: 1px;
  content: "";
}
input.cmn-toggle-round + label:before {
  right: 1px;
  background-color: #f1f1f1;
  -webkit-border-radius: 30px;
  -moz-border-radius: 30px;
  -ms-border-radius: 30px;
  -o-border-radius: 30px;
  border-radius: 30px;
  -webkit-transition: background 0.4s;
  -moz-transition: background 0.4s;
  -o-transition: background 0.4s;
  transition: background 0.4s;
}
input.cmn-toggle-round + label:after {
  width: 40px;
  background-color: #fff;
  -webkit-border-radius: 100%;
  -moz-border-radius: 100%;
  -ms-border-radius: 100%;
  -o-border-radius: 100%;
  border-radius: 100%;
  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  -webkit-transition: margin 0.4s;
  -moz-transition: margin 0.4s;
  -o-transition: margin 0.4s;
  transition: margin 0.4s;
}
input.cmn-toggle-round:checked + label:before {
  background-color: #8ce196;
}
input.cmn-toggle-round:checked + label:after {
  margin-left: 60px;
}

.cmn-toggle {
  position: absolute;
  margin-left: -9999px;
  visibility: hidden;
}
.cmn-toggle + label {
  display: block;
  position: relative;
  cursor: pointer;
  outline: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

{!!Form::label('pluss_customer',trans('noorsi.customer.pluss_customer'),array('class'=>'col-xs-12 col-sm-5 col-md-4 col-lg-3 cmn toggle cmn toggle round control label'))
{!!Form::checkbox('pluss_customer',1,@$customer->pluss_customer,数组('class'=>'cmn-toggle-cmn-toggle-toggle-round','id'=>'pluss_customer','name'=>'pluss_customer'))
还有我的css代码:
input.cmn-toggle-round+标签{
填充:2px;
宽度:100px;
高度:30px;
背景色:#dddddd;
-webkit边界半径:30px;
-moz边界半径:30px;
-ms边界半径:30px;
-o-边界半径:30px;
边界半径:30px;
}
input.cmn-toggle-round+标签:之前,input.cmn-toggle-round+标签:之后{
显示:块;
位置:绝对位置;
顶部:1px;
左:1px;
底部:1px;
内容:“;
}
input.cmn-toggle-round+标签:之前{
右:1px;
背景色:#f1f1;
-webkit边界半径:30px;
-moz边界半径:30px;
-ms边界半径:30px;
-o-边界半径:30px;
边界半径:30px;
-webkit转换:后台0.4s;
-moz转换:背景0.4s;
-o-过渡:背景0.4s;
过渡:背景0.4s;
}
input.cmn-toggle-round+标签:之后{
宽度:40px;
背景色:#fff;
-webkit边界半径:100%;
-moz边界半径:100%;
-ms边界半径:100%;
-o-边界半径:100%;
边界半径:100%;
-webkit盒阴影:0 2px 5px rgba(0,0,0,0.3);
-moz盒阴影:0 2px 5px rgba(0,0,0,0.3);
盒影:0 2px 5px rgba(0,0,0,0.3);
-webkit过渡:利润率0.4s;
-moz过渡:裕度0.4s;
-o-过渡:裕度0.4s;
过渡期:利润率0.4s;
}
input.cmn切换圆:选中+标签:之前{
背景色:#8ce196;
}
input.cmn切换圆:选中+标签:之后{
左边距:60像素;
}
.cmn开关{
位置:绝对位置;
左边距:-9999px;
可见性:隐藏;
}
.cmn切换+标签{
显示:块;
位置:相对位置;
光标:指针;
大纲:无;
-webkit用户选择:无;
-moz用户选择:无;
-ms用户选择:无;
用户选择:无;
}
如何在laravel中使用此开关按钮,以及如何将值传递到控制器页面0s和1s
任何人请帮助我朋友的

复选框不发送0或1。如果选中复选框,它将发送<代码>开如果未选中,您将在请求中看不到任何内容。是的,我如何在控制器页面中为开、关发送此值,以及此代码在laravel中不工作,复选框不发送0或1。如果选中复选框,它将发送<代码>开如果未选中,您将在请求中看不到任何内容。是的,我如何在控制器页面中发送此开、关值,以及此代码在laravel中不工作,