customer register
This commit is contained in:
@@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>SISTEM AR-RAHN</title>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
<script src="{{ asset('vendor/adminlte/dist/js/adminlte.js') }}" defer></script>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<!-- Styles -->
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/main.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('vendor/adminlte/dist/css/adminlte.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('vendor/fontawesome-free/css/all.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('vendor/DataTables/datatables.min.css') }}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<link href="{{ asset('css/select2.min.css') }}" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css"/>
|
||||
|
||||
<script src="{{ asset('js/jquery.min.js') }}"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
<script src="{{ asset('js/select2.min.js') }}"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
|
||||
<script src="{{ asset('vendor/DataTables/datatables.min.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
|
||||
|
||||
{{-- jquery validation --}}
|
||||
<script src="{{ asset('js/jquery.validate.min.js') }}"></script>
|
||||
<script src="{{ asset('js/additional-methods.min.js') }}"></script>
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
color: #636b6f;
|
||||
font-family: 'Nunito', sans-serif;
|
||||
font-weight: 200;
|
||||
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: 13px;
|
||||
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">
|
||||
@auth
|
||||
<a href="{{ url('/home') }}">Home</a>
|
||||
@else
|
||||
<a href="{{ route('login') }}">Login</a>
|
||||
|
||||
@if (Route::has('register'))
|
||||
<a href="{{ route('register') }}">Register</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
Laravel
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<button class="btn btn-primary" id="login_button">Login</button>
|
||||
<button class="btn btn-primary" id="logout_button">Logout</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var auth_token;
|
||||
$('#login_button').click(function(){
|
||||
$.ajax({
|
||||
method:'POST',
|
||||
url:'http://e-arrahn.test/api/mobile/login',
|
||||
data:{
|
||||
'email':'aziz@pkb.net',
|
||||
'password':'Abc123'
|
||||
},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
auth_token = data['token']['token'];
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Berjaya!',
|
||||
text: 'Login Berjaya'
|
||||
});
|
||||
},
|
||||
error: function(xhRequest, ErrorText, thrownError){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Login Tidak Berjaya'
|
||||
});
|
||||
console.log(xhRequest);
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#logout_button').click(function(){
|
||||
$.ajax({
|
||||
method:'GET',
|
||||
url:'http://e-arrahn.test/api/mobile/logout',
|
||||
headers:{
|
||||
'Authorization':'Bearer '+auth_token,
|
||||
'Accept':'*'
|
||||
},
|
||||
success:function(data){
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Berjaya!',
|
||||
text: 'Logout Berjaya'
|
||||
});
|
||||
},
|
||||
error: function(xhRequest, ErrorText, thrownError){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Logout Tidak Berjaya'
|
||||
});
|
||||
console.log(xhRequest);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user