Commit fdde0451 by Tio

tambahan

parent 07dedd33
/**
* First we will load all of this project's JavaScript dependencies which
* include Vue and Vue Resource. This gives a great starting point for
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
/**
* Next, we will create a fresh Vue application instance and attach it to
* the body of the page. From here, you may begin adding components to
* the application, or feel free to tweak this setup for your needs.
*/
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: '#app'
});
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
window.$ = window.jQuery = require('jquery');
require('bootstrap-sass');
/**
* Vue is a modern JavaScript library for building interactive web interfaces
* using reactive data binding and reusable components. Vue's API is clean
* and simple, leaving you to focus on building your next great project.
*/
window.Vue = require('vue');
require('vue-resource');
/**
* We'll register a HTTP interceptor to attach the "CSRF" header to each of
* the outgoing requests issued by this application. The CSRF middleware
* included with Laravel will automatically verify the header's value.
*/
Vue.http.interceptors.push((request, next) => {
request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);
next();
});
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from "laravel-echo"
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: 'your-pusher-key'
// });
<template>
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Example Component</div>
<div class="panel-body">
I'm an example component!
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
console.log('Component ready.')
}
}
</script>
// Body
$body-bg: #f5f8fa;
// Borders
$laravel-border-color: darken($body-bg, 10%);
$list-group-border: $laravel-border-color;
$navbar-default-border: $laravel-border-color;
$panel-default-border: $laravel-border-color;
$panel-inner-border: $laravel-border-color;
// Brands
$brand-primary: #3097D1;
$brand-info: #8eb4cb;
$brand-success: #2ab27b;
$brand-warning: #cbb956;
$brand-danger: #bf5329;
// Typography
$font-family-sans-serif: "Raleway", sans-serif;
$font-size-base: 14px;
$line-height-base: 1.6;
$text-color: #636b6f;
// Navbar
$navbar-default-bg: #fff;
// Buttons
$btn-default-color: $text-color;
// Inputs
$input-border: lighten($text-color, 40%);
$input-border-focus: lighten($brand-primary, 25%);
$input-color-placeholder: lighten($text-color, 30%);
// Panels
$panel-default-heading-bg: #fff;
// Fonts
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
// Variables
@import "variables";
// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'password' => 'Passwords must be at least six characters and match the confirmation.',
'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.",
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
'string' => 'The :attribute must be between :min and :max characters.',
'array' => 'The :attribute must have between :min and :max items.',
],
'boolean' => 'The :attribute field must be true or false.',
'confirmed' => 'The :attribute confirmation does not match.',
'date' => 'The :attribute is not a valid date.',
'date_format' => 'The :attribute does not match the format :format.',
'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.',
'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field is required.',
'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.',
'json' => 'The :attribute must be a valid JSON string.',
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values is present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
'file' => 'The :attribute must be :size kilobytes.',
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
'url' => 'The :attribute format is invalid.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [],
];
<!DOCTYPE html>
<html>
<head>
<title>Be right back.</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato', sans-serif;
}
.container {
text-align: center;
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 72px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">Be right back.</div>
</div>
</div>
</body>
</html>
@extends('layout')
@section('judul')
Buat Identitas
@endsection
@section('konten')
<div class="row">
<h3>Buat Identitas Baru</h3>
<form action="{{ url('identity') }}" method="post" class="form-horizontal">
{{csrf_field()}} <!--UNTUK KEAMANAN DATA DARI HACKER-->
<div class="form-group">
<label class="col-md-4 control-label" for="name">Nama Lengkap</label>
<div class="col-md-5">
<input type="text" name="fullnames" placeholder="Nama Lengkap" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="sex">Jenis Kelamin</label>
<div class="col-md-4">
<label class="radio-inline" for="sex-0">
<input type="radio" name="sex" id="sex-0" value="Male">
Male
</label>
<label class="radio-inline" for="sex-1">
<input type="radio" name="sex" id="sex-1" value="Female">
Female
</label>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="idcard">Nomor Kartu Identitas</label>
<div class="col-md-5">
<input type="text" name="idcard" placeholder="Nomor Kartu Identitas" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="birthdate">Tanggal Lahir</label>
<div class="col-md-5">
<input type="text" name="birthdate" id="birthdate" placeholder="dd/mm/yyyy" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="province">Provinsi</label>
<div class="col-md-5">
<input type="text" name="province" placeholder="Provinsi" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="district">Distrik</label>
<div class="col-md-5">
<input type="text" name="district" placeholder="Distrik" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="sector">Kecamatan</label>
<div class="col-md-5">
<input type="text" name="sector" placeholder="Kecamatan" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="cellar">Kelurahan</label>
<div class="col-md-5">
<input type="text" name="cellar" placeholder="Kelurahan" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="image">Image</label>
<div class="col-md-5">
<div class="input-group">
<span class="input-group-btn">
<label class="btn btn-default btn-file">
Browse&hellip;<input type="file" style="display: none;" name="image" id="browse">
</label>
</span>
<input type="text" class="form-control input-md" id="i" name="i" placeholder="not file selected" disabled="true">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
<button id="submit" name="submit" class="btn btn-success"> Simpan</button>
</div>
</div>
</form>
</div>
</section>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#birthdate').datepicker({
format: "dd/mm/yyyy"
});
});
$(function() {
// We can attach the `fileselect` event to all file inputs on the page
$(document).on('change', ':file', function() {
var input = $(this),
numFiles = input.get(0).files ? input.get(0).files.length : 1,
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
input.trigger('fileselect', [numFiles, label]);
});
// We can watch for our custom `fileselect` event like this
$(document).ready( function() {
$(':file').on('fileselect', function(event, numFiles, label) {
var input = $(this).parents('.input-group').find(':text'),
log = numFiles > 1 ? numFiles + ' files selected' : label;
if( input.length ) {
input.val(log);
} else {
if( log ) alert(log);
}
});
});
});
</script>
@endsection
@extends('layout')
@section('judul')
Daftar Identitas Mahasiswa SI-01
@endsection
@section('konten')
<br/>
<body style="body">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<a href="{{ url('identity/create') }}" class="btn btn-success"><i class="glyphicon glyphicon-plus"></i> Tambah Data </a>
<a href="{{ url('identity') }}" class="btn btn-primary"><i class="glyphicon glyphicon-list"></i> Daftar Identitas </a>
</div>
<div>
<form method="get">
<input required type="text" name="name" placeholder="Search By Name"/>
<input required type="hidden" name="controller" value="Search"/>
<input required type="hidden" name="action" value="search"/>
<button type="submit" class="btn btn-success"><i class="glyphicon glyphicon-search"></i> Search</button>
</form>
</div>
</div>
<br/>
<section class="panel panel-default">
<header class="panel-heading">
<h3>Daftar Identitas SI-01 2014</h3>
</header>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<!-- <th>ID</th> -->
<th>Foto</th>
<th>Nama</th>
<th>Jenis_Kelamin</th>
<th>IdCard</th>
<th>BirthDate</th>
<th>Provinsi</th>
<th>Distrik</th>
<th>Kecamatan</th>
<th>Kelurahan</th>
<th>Opsi</th>
</tr>
</thead>
<tbody>
@foreach($data as $a)
<tr>
<!--<td>{{$a->id}}</td> <!--ID-->
<td><img src="images/<?php echo $a->image; ?>" style="max-width: 10em; max-height: 10em;"></td> <!--Foto-->
<td>{{$a->fullnames}}</td> <!--Nama-->
<td>{{$a->sex}}</td> <!--Gender-->
<td>{{$a->idcard}}</td> <!--IDCard-->
<td>{{$a->birthdate}}</td> <!--BirthDate-->
<td>{{$a->province}}</td> <!--Province-->
<td>{{$a->district}}</td> <!--Distrik-->
<td>{{$a->sector}}</td> <!--Kecamatan-->
<td>{{$a->cellar}}</td> <!--Kelurahan-->
<td> <!--Untuk Kolom OPSI-->
<div>
<a href="{{url('identity/'.$a->id.'/edit')}}" class="btn btn-primary" title="edit {{$a->fullnames}}"><i class="glyphicon glyphicon-edit"></i></a>
<form action="{{ url('identity/'.$a->id) }}" method="post">
{{csrf_field()}}
<br/>
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="btn btn-danger" title="delete {{$a->fullnames}}"><i class="glyphicon glyphicon-trash"></i></button>
</form>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection
@section('script')
<script type="text/javascript">
$(document).ready(function(){
$('#search').on('keyup',function(){
$value = $(this).val();
$.ajax({
type : 'get',
url : '{{URL::to('search')}}',
data : {'search':$value},
success:function(data){
$('tbody').html(data);
}
});
});
});
</script>
@endsection
@extends('layout')
@section('judul')
Edit Data Identitas
@endsection
@section('konten')
<div class="row">
<h3>Edit Data Identitas</h3>
<form action="{{ url('identity/'.$data->id) }}" method="post" class="form-horizontal">
<input type="hidden" name="_method" value="put">
{{csrf_field()}}
<div class="form-group">
<label class="col-md-4 control-label" for="name">Nama Lengkap</label>
<div class="col-md-5">
<input type="text" name="fullnames" placeholder="Nama Lengkap" class="form-control input-md" value="{{$data->name}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="sex">Jenis Kelamin</label>
<div class="col-md-4">
<label class="radio-inline" for="sex-0">
<input type="radio" name="sex" id="sex-0" value="Male">
Male
</label>
<label class="radio-inline" for="sex-1">
<input type="radio" name="sex" id="sex-1" value="Female">
Female
</label>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="idcard">Nomor Kartu Identitas</label>
<div class="col-md-5">
<input type="text" name="idcard" placeholder="Nomor Kartu Identitas" class="form-control input-md" value="{{$data->idcard}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="birthdate">Tanggal Lahir</label>
<div class="col-md-5">
<input type="text" name="birthdate" id="birthdate" placeholder="Tanggal Lahir" class="form-control input-md" value="{{$data->birthdate}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="province">Provinsi</label>
<div class="col-md-5">
<input type="text" name="province" placeholder="Provinsi" class="form-control input-md" value="{{$data->province}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="district">Distrik</label>
<div class="col-md-5">
<input type="text" name="district" placeholder="Distrik" class="form-control input-md" value="{{$data->district}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="sector">Kecamatan</label>
<div class="col-md-5">
<input type="text" name="sector" placeholder="Kecamatan" class="form-control input-md" value="{{$data->sector}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="cellar">Kelurahan</label>
<div class="col-md-5">
<input type="text" name="cellar" placeholder="Kelurahan" class="form-control input-md" value="{{$data->cellar}}" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="image">Image</label>
<div class="col-md-5">
<div class="input-group">
<span class="input-group-btn">
<label class="btn btn-default btn-file">
Browse&hellip;<input type="file" style="display: none;" name="image" id="browse">
</label>
</span>
<input type="text" class="form-control input-md" id="i" name="i" value="{{$data->image}}" placeholder="not file selected" disabled="true">
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
<button id="submit" name="submit" class="btn btn-success">Simpan</button>
</div>
</div>
</form>
</div>
</section>
@endsection
@section('script')
<script>
$(document).ready(function(){
$('#birthdate').datepicker({
format: "dd/mm/yyyy"
});
});
$(function() {
// We can attach the `fileselect` event to all file inputs on the page
$(document).on('change', ':file', function() {
var input = $(this),
numFiles = input.get(0).files ? input.get(0).files.length : 1,
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
input.trigger('fileselect', [numFiles, label]);
});
// We can watch for our custom `fileselect` event like this
$(document).ready( function() {
$(':file').on('fileselect', function(event, numFiles, label) {
var input = $(this).parents('.input-group').find(':text'),
log = numFiles > 1 ? numFiles + ' files selected' : label;
if( input.length ) {
input.val(log);
} else {
if( log ) alert(log);
}
});
});
});
</script>
@endsection
<!DOCTYPE html>
<html>
<head>
<title>@yield('judul')</title> <!--Judul setiap halaman pasti berbeda-beda-->
<link rel="stylesheet" type="text/css" href="{{ asset('bootstrap/dist/css/bootstrap.min.css') }}"> <!--asset berguna untuk memanggil semua isi dari file yang dituju-->
<script type="text/javascript" src="js/script.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="{{asset('js/jquery-1.9.1.min.js')}}"></script>
<script type="text/javascript" src="{{asset('js/bootstrap-datepicker.js')}}"></script>
</head>
<body>
<div class="col-md-10 col-md-offset-1">
@yield('konten')
</div>
@yield('script')
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Raleway', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/register') }}">Register</a>
</div>
@endif
<div class="content">
<div class="title m-b-md">
Laravel
</div>
<div class="links">
<a href="https://laravel.com/docs">Documentation</a>
<a href="https://laracasts.com">Laracasts</a>
<a href="https://laravel-news.com">News</a>
<a href="https://forge.laravel.com">Forge</a>
<a href="https://github.com/laravel/laravel">GitHub</a>
</div>
</div>
</div>
</body>
</html>
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