Commit f2601f3a by PANGERAN\pangeran

udah banyak perubahan son

parent b2367849
...@@ -24,7 +24,7 @@ class UpdateRequest extends FormRequest ...@@ -24,7 +24,7 @@ class UpdateRequest extends FormRequest
public function rules() public function rules()
{ {
return [ return [
'foto' => 'Required',
'nama' => 'Required', 'nama' => 'Required',
'family' => 'Required', 'family' => 'Required',
'tanggal_tanam' => 'Required', 'tanggal_tanam' => 'Required',
...@@ -38,7 +38,7 @@ class UpdateRequest extends FormRequest ...@@ -38,7 +38,7 @@ class UpdateRequest extends FormRequest
public function messages() public function messages()
{ {
return [ return [
'foto.required' => 'silahkan Upload Foto.',
'nama.required' => 'Nama Tidak Boleh Kosong.', 'nama.required' => 'Nama Tidak Boleh Kosong.',
'family.required' => 'Family Tidak Boleh Kosong.', 'family.required' => 'Family Tidak Boleh Kosong.',
'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.', 'tanggal_tanam.required' => 'Tanggal Tanamn Tidak Boleh Kosong.',
......
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
<div class="box-body"> <div class="box-body">
<!--data sayur --> <!--data sayur -->
<div class="container">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="panel panel-default"> <div class="panel panel-default">
...@@ -328,8 +328,8 @@ ...@@ -328,8 +328,8 @@
{!! $errors->first('family', '<p class="help-block">:message</p>') !!} {!! $errors->first('family', '<p class="help-block">:message</p>') !!}
</div> </div>
<div class="form-group{{ $errors->has('tanggal_tanam') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('tanggal_tanam') ? ' has-error' : '' }}">
<label class="col-sm-2 control-label">Tanggal Tanam</label> <label class="col-sm-2 control-label">Tanggal Tanam</label><br><br>
<input type="date" name="tanggal_tanam" class="form-control" placeholder="Tanggal Tanam"> <input type="date" name="tanggal_tanam" class="form-control" placeholder="Tanggal Tanam" style="width:25%;margin-left:0%;">
{!! $errors->first('tanggal_tanam', '<p class="help-block">:message</p>') !!} {!! $errors->first('tanggal_tanam', '<p class="help-block">:message</p>') !!}
</div> </div>
<div class="form-group{{ $errors->has('usia') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('usia') ? ' has-error' : '' }}">
...@@ -367,13 +367,10 @@ ...@@ -367,13 +367,10 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!--end data sayur --> <!--end data sayur -->
</div> </div>
<!-- /.box-body --> <!-- /.box-body -->
<div class="box-footer">
Footer
</div>
<!-- /.box-footer--> <!-- /.box-footer-->
</div> </div>
<!-- /.box --> <!-- /.box -->
...@@ -384,7 +381,7 @@ ...@@ -384,7 +381,7 @@
<footer class="main-footer"> <footer class="main-footer">
<div class="pull-right hidden-xs"> <div class="pull-right hidden-xs">
<b>Version</b> 2.3.8
</div> </div>
<strong>Copyright &copy; 2016-2017 <a href="http://almsaeedstudio.com">PA02-32TK-007</a>.</strong> All rights <strong>Copyright &copy; 2016-2017 <a href="http://almsaeedstudio.com">PA02-32TK-007</a>.</strong> All rights
reserved. reserved.
......
...@@ -293,16 +293,18 @@ ...@@ -293,16 +293,18 @@
{{csrf_field()}} {{csrf_field()}}
<div class="form-group{{ $errors->has('foto') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('foto') ? ' has-error' : '' }}">
<img src="http://placehold.it/100x100" id="showimages" style="max-width:200px;max-height:200px;float:left;"/> <img src="<?php echo asset("image/$sayurs->foto")?>" id="showimages" style="max-width:200px;max-height:200px;float:left;"/>
<input type="file" id="inputimages" name="foto"> {{--<input type="file" id="inputimages" name="foto" >--}}
{!! $errors->first('foto', '<p class="help-block">:message</p>') !!} {!! $errors->first('foto', '<p class="help-block">:message</p>') !!}
</div> </div>
<div class="form-group{{ $errors->has('nama') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('nama') ? ' has-error' : '' }}">
<input type="text" name="nama" class="form-control" placeholder="Nama" value="{{$sayurs->nama}}"> <br><br><br><br><br><br><br><label class="col-sm-2 control-label">Nama Tanaman</label>
<br><br><input type="text" name="nama" class="form-control" placeholder="Nama" value="{{$sayurs->nama}}">
{!! $errors->first('nama', '<p class="help-block">:message</p>') !!} {!! $errors->first('nama', '<p class="help-block">:message</p>') !!}
</div> </div>
<div class="form-group{{ $errors->has('family') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('family') ? ' has-error' : '' }}">
<label class="col-sm-2 control-label">Family</label>
<input type="text" name="family" class="form-control" placeholder="Family" value="{{$sayurs->family}}"> <input type="text" name="family" class="form-control" placeholder="Family" value="{{$sayurs->family}}">
{!! $errors->first('family', '<p class="help-block">:message</p>') !!} {!! $errors->first('family', '<p class="help-block">:message</p>') !!}
</div> </div>
......
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
<div class="form-group{{ $errors->has('foto') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('foto') ? ' has-error' : '' }}">
<label class="col-sm-2 control-label">Foto</label> <label class="col-sm-2 control-label">Foto</label>
<label class="control-label"> <img src="<?php echo asset("image/$sayurs->foto") ?>" style="max-height:40px; max-width:40px; margin-top:10px; "> </img> </label> <label class="control-label"> <img src="<?php echo asset("image/$sayurs->foto") ?>" style="max-height:100px; max-width:100px; margin-top:10px; float:left"> </img> </label>
{!! $errors->first('family', '<p class="help-block">:message</p>') !!} {!! $errors->first('family', '<p class="help-block">:message</p>') !!}
</div> </div>
<div class="form-group{{ $errors->has('nama') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('nama') ? ' has-error' : '' }}">
...@@ -355,9 +355,54 @@ ...@@ -355,9 +355,54 @@
<INPUT TYPE="text" NAME="inputbox" VALUE="192.168.43.75"> <INPUT TYPE="text" NAME="inputbox" VALUE="192.168.43.75">
</FORM> </FORM>
</div> </div>
<h3> Scroll untuk menyiram sayur</h3> <h3> Scroll untuk menyiram sayur</h3><br>
<input type="range" width="6%" min="20" max="170" onmouseup="servo1(this.value)" /> {{--<input list="tickmarks" type="range" style="width: 100px; height: 50px" onmouseup="servo1(this.value)" />--}}
{{--<datalist id="tickmarks">--}}
{{--<option value="0" label="0%">--}}
{{--<option value="10">--}}
{{--<option value="20">--}}
{{--<option value="30">--}}
{{--<option value="40">--}}
{{--<option value="50" label="50%"/>--}}
{{--<option value="60">--}}
{{--<option value="70">--}}
{{--<option value="80">--}}
{{--<option value="90">--}}
{{--<option value="100" label="100%"/>--}}
{{--</datalist>--}}
<label for="vol">Volume</label>
<input type="range" min="0" max="100" value="50" id="vol" oninput="nilai(value)" onClick="hey()" onmouseup="servo1(this.value)" >
<output for="vol" id="volume">50</output>
<script>
function nilai(vol) {
document.querySelector('#volume').value = vol;
}
function hey() {
var vol = document.getElementById('vol').value;
if(vol<=2){
alert("Penyiraman Ditutup");
}
else if (vol >=2){alert("Melakukan Penyiraman");
}
else {alert("Penyiraman Berhasil");}
}
</script>
{{--<input type="range" id="r" min="1" max="20">--}}
{{--<input type="submit" id="sub">--}}
{{--<script>--}}
{{--var r1=document.getElementById("sub");--}}
{{--r1.onclick=function(){--}}
{{--var r = document.getElementById('r').value;--}}
{{--if(r>10){--}}
{{--alert("You crossed the half of it");--}}
{{--}--}}
{{--else alert("Value less than 10");--}}
{{--};--}}
{{--</script>--}}
<script> <script>
$.ajaxSetup({timeout:1000}); $.ajaxSetup({timeout:1000});
...@@ -369,11 +414,7 @@ ...@@ -369,11 +414,7 @@
{Connection: close}; {Connection: close};
} }
</script> </script>
</div>
<!-- /.box-body -->
<div class="box-footer">
Footer
</div>
<!-- /.box-footer--> <!-- /.box-footer-->
</div> </div>
<!-- /.box --> <!-- /.box -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment