Active checkbox changed to integer

This commit is contained in:
Tim 2017-07-08 11:25:09 +02:00
parent a5b71ae09e
commit aece7809fa
2 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ class Airline extends Model
'fuel_100ll_cost', 'fuel_100ll_cost',
'fuel_jeta_cost', 'fuel_jeta_cost',
'fuel_mogas_cost', 'fuel_mogas_cost',
'active', 'active'
]; ];
/** /**
@ -34,7 +34,7 @@ class Airline extends Model
'fuel_100ll_cost' => 'double', 'fuel_100ll_cost' => 'double',
'fuel_jeta_cost' => 'double', 'fuel_jeta_cost' => 'double',
'fuel_mogas_cost' => 'double', 'fuel_mogas_cost' => 'double',
'active' => 'boolean', 'active' => 'integer'
]; ];
/** /**
@ -44,7 +44,7 @@ class Airline extends Model
*/ */
public static $rules = [ public static $rules = [
'code' => 'required|max:3|unique:airlines', 'code' => 'required|max:3|unique:airlines',
'name' => 'required', 'name' => 'required'
]; ];
} }

View File

@ -14,8 +14,8 @@
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{!! Form::label('active', 'Active:') !!} {!! Form::label('active', 'Active:') !!}
<label class="checkbox-inline"> <label class="checkbox-inline">
{!! Form::hidden('active', false) !!} {!! Form::hidden('active', 0, false) !!}
{!! Form::checkbox('active', 'True', null) !!} 1 {!! Form::checkbox('active', 1, null) !!}
</label> </label>
</div> </div>