feat: add validation error message
This commit is contained in:
parent
c382ebd335
commit
f2be35c45b
@ -33,7 +33,8 @@ public function loginAction(LoginRequest $request){
|
||||
|
||||
public function register(){
|
||||
return view('auth.register', [
|
||||
'title' => 'Daftar'
|
||||
'title' => 'Daftar',
|
||||
'sample' => "Hai"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/dashlite.css?ver=3.0.3')}}">
|
||||
<link rel="stylesheet" href="{{asset('assets/dashboard/css/custom.css')}}">
|
||||
<link id="skin-default" rel="stylesheet" href="{{asset('assets/dashboard/css/theme.css?ver=3.0.3')}}">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
|
||||
</head>
|
||||
|
||||
<body class="nk-body bg-white npc-default pg-auth">
|
||||
@ -34,9 +35,6 @@
|
||||
</div>
|
||||
<div class="nk-block-head">
|
||||
<div class="nk-block-head-content">
|
||||
@foreach ($errors->all() as $err)
|
||||
{{ $err . " " }}
|
||||
@endforeach
|
||||
<h5 class="nk-block-title">Daftar Akun</h5>
|
||||
<div class="nk-block-des">
|
||||
<p>Buat akun baru untuk mengakses panel.</p>
|
||||
@ -582,6 +580,39 @@
|
||||
<script src="{{asset('assets/dashboard/js/scripts.js?ver=3.0.3')}}"></script>
|
||||
<script src="{{asset('assets/dashboard/js/libs/tagify.js?ver=3.0.3')}}"></script>
|
||||
<script src="{{asset('assets/dashboard/js/custom.js')}}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
|
||||
|
||||
{{-- @if (session('success-status'))
|
||||
<script>
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Sukses',
|
||||
text: '{{ session('success-status') }}',
|
||||
position: 'top-end', // Atur posisi ke atas kanan
|
||||
showConfirmButton: false, // Sembunyikan tombol OK agar lebih mirip toast
|
||||
timer: 3000, // Auto-close dalam 3 detik
|
||||
toast: true // Ubah menjadi gaya toast
|
||||
});
|
||||
</script>
|
||||
@endif --}}
|
||||
|
||||
@if ($errors->any())
|
||||
<script>
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Gagal',
|
||||
html: `{!! implode('<br>', $errors->all()) !!}`,
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{-- <script>
|
||||
// Menambahkan log untuk memastikan script berjalan
|
||||
console.log("Script loaded!");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user