Created
November 13, 2019 06:52
-
-
Save adeguntoro/7efa6f28fb9fbfa5d0ab30e6c89c3988 to your computer and use it in GitHub Desktop.
laravel 2 form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class Checkbox extends Controller { | |
public function index() | |
{ | |
// | |
return view('checkbox.index'); | |
} | |
public function store(Request $request) | |
{ | |
return response()->json($request->all()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
<link rel="stylesheet" href="{{ asset('datepicker/css/bootstrap-datepicker.css') }}"> | |
<title>Hello, world!</title> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="box-body"> | |
<form action="{{route ('checkbox.store')}}" method="post" id="formID"> | |
{{ csrf_field() }} | |
<div class="box-header with-border"> | |
<h3 class="box-title">Data Job Order</h3> | |
</div> | |
<div class="form-group row"> | |
<label class="col-md-4 control-label">Kode Job Order</label> | |
<div class="col-sm-8"> | |
<input type="text" name="id" class="form-control" placeholder="Kode Job Order" required> | |
</div> | |
</div> | |
<div class="form-group row"> | |
<label class="col-md-4 control-label">Tanggal Masuk</label> | |
<div class="col-sm-8"> | |
<input type="text" class="form-control pull-left" name="tglmasuk" id="datepicker" data-provide="datepicker"> | |
</div> | |
</div> | |
<div class="form-group row"> | |
<label class="col-md-4 control-label">Tanggal Keluar</label> | |
<div class="col-sm-8"> | |
<input type="text" class="form-control pull-left" name="tglkeluar" id="datepicker2" data-provide="datepicker"> | |
</div> | |
</div> | |
<button class="btn btn-success" type="submit">Simpan</button><br> | |
<button class="btn btn-danger" type="reset">Reset</button> | |
</form> | |
<div class="card"> | |
<div class="card-header">Kelengkapan Mobil</div> | |
<div class="card-body"> | |
<div class="form-group row"> | |
<div class="col-sm-4">STNK</div> | |
<div class="col-sm-8"> | |
<div class="form-check"> | |
<input class="form-check-input" type="checkbox" name="stnk" form="formID" value="1"><label class="form-check-label">ada</label> | |
</div> | |
</div> | |
</div> | |
<div class="form-group row"> | |
<div class="col-sm-4">Buku Manual</div> | |
<div class="col-sm-8"> | |
<div class="form-check"> | |
<input class="form-check-input" type="checkbox" name="manual_book" form="formID" value="1"><label class="form-check-label">ada</label> | |
</div> | |
</div> | |
</div> | |
<div class="form-group row"> | |
<div class="col-sm-4">Head Lamp</div> | |
<div class="col-sm-8"> | |
<div class="form-check"> | |
<input class="form-check-input" type="checkbox" name="headlamp" form="formID" value="1"><label class="form-check-label">ada</label> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> | |
<script src="{{ asset('datepicker/js/bootstrap-datepicker.js') }}"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment