This commit is contained in:
DimazzP 2023-11-08 15:29:16 +07:00
commit 12979a9e9a
7 changed files with 118 additions and 126 deletions

View File

@ -50,11 +50,15 @@ public function __construct()
protected function validator(array $data) protected function validator(array $data)
{ {
return Validator::make($data, [ return Validator::make($data, [
'nama_lengkap' => ['required', 'string', 'max:255'], 'nama_lengkap' => ['required', 'string', 'max:255', 'regex:/^[A-Za-z\s]+$/'],
'nim' => ['required', 'string', 'max:20'], 'nim' => ['required', 'string', 'max:20'],
'semester' => ['required', 'integer', 'max:12'], 'semester' => ['required', 'integer', 'max:12'],
'angkatan' => ['required', 'integer', 'max:2250'], 'angkatan' => ['required', 'integer', 'min:2021', 'max:2023'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users', function ($attribute, $value, $fail) {
if (!in_array(substr(strrchr($value, "@"), 1), ['polije.ac.id', 'student.polije.ac.id'])) {
$fail('Atribut ' . $attribute . ' harus berdomain @polije.ac.id atau @student.polije.ac.id');
}
}],
'password' => ['required', 'string', 'min:8', 'confirmed'], 'password' => ['required', 'string', 'min:8', 'confirmed'],
]); ]);
} }
@ -74,9 +78,9 @@ protected function create(array $data)
'angkatan' => $data['angkatan'], 'angkatan' => $data['angkatan'],
'email' => $data['email'], 'email' => $data['email'],
'password' => Hash::make($data['password']), 'password' => Hash::make($data['password']),
'foto' => 'images/2xUcdtkygOf0aM2EvXuKFLXLOBlEuXNPT21Oeo15.png', // 'foto' => 'images/2xUcdtkygOf0aM2EvXuKFLXLOBlEuXNPT21Oeo15.png',
'kelas_user' => '3', 'kelas_user' => '3',
'foto' => 'images/BoeaT0jCWccM0FW9FxE1HS1ej5J61n99JbEBzWlS.jpg', 'foto' => 'images/defaultProfile.jpg',
]); ]);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@ -1,134 +1,122 @@
<?php <?php
return [ return [
'accepted' => 'Atribut :attribute harus diterima.',
/* 'accepted_if' => 'Atribut :attribute harus diterima ketika :other adalah :value.',
|-------------------------------------------------------------------------- 'active_url' => 'Atribut :attribute bukan URL yang valid.',
| Validation Language Lines 'after' => 'Atribut :attribute harus tanggal setelah :date.',
|-------------------------------------------------------------------------- 'after_or_equal' => 'Atribut :attribute harus tanggal setelah atau sama dengan :date.',
| 'alpha' => 'Atribut :attribute hanya boleh berisi huruf.',
| The following language lines contain the default error messages used by 'alpha_dash' => 'Atribut :attribute hanya boleh berisi huruf, angka, tanda hubung, dan garis bawah.',
| the validator class. Some of these rules have multiple versions such 'alpha_num' => 'Atribut :attribute hanya boleh berisi huruf dan angka.',
| as the size rules. Feel free to tweak each of these messages here. 'array' => 'Atribut :attribute harus berupa larik (array).',
| 'before' => 'Atribut :attribute harus tanggal sebelum :date.',
*/ 'before_or_equal' => 'Atribut :attribute harus tanggal sebelum atau sama dengan :date.',
'accepted' => 'The :attribute must be accepted.',
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute must only contain letters.',
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [ 'between' => [
'numeric' => 'The :attribute must be between :min and :max.', 'numeric' => 'Atribut :attribute harus antara :min dan :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.', 'file' => 'Atribut :attribute harus antara :min dan :max kilobita.',
'string' => 'The :attribute must be between :min and :max characters.', 'string' => 'Atribut :attribute harus antara :min dan :max karakter.',
'array' => 'The :attribute must have between :min and :max items.', 'array' => 'Atribut :attribute harus memiliki antara :min dan :max item.',
], ],
'boolean' => 'The :attribute field must be true or false.', 'boolean' => 'Atribut :attribute harus benar atau salah.',
'confirmed' => 'The :attribute confirmation does not match.', 'confirmed' => 'Konfirmasi :attribute tidak cocok.',
'current_password' => 'The password is incorrect.', 'current_password' => 'Kata sandi salah.',
'date' => 'The :attribute is not a valid date.', 'date' => 'Atribut :attribute bukan tanggal yang valid.',
'date_equals' => 'The :attribute must be a date equal to :date.', 'date_equals' => 'Atribut :attribute harus tanggal yang sama dengan :date.',
'date_format' => 'The :attribute does not match the format :format.', 'date_format' => 'Atribut :attribute tidak cocok dengan format :format.',
'declined' => 'The :attribute must be declined.', 'declined' => 'Atribut :attribute harus ditolak.',
'declined_if' => 'The :attribute must be declined when :other is :value.', 'declined_if' => 'Atribut :attribute harus ditolak ketika :other adalah :value.',
'different' => 'The :attribute and :other must be different.', 'different' => 'Atribut :attribute dan :other harus berbeda.',
'digits' => 'The :attribute must be :digits digits.', 'digits' => 'Atribut :attribute harus :digits digit.',
'digits_between' => 'The :attribute must be between :min and :max digits.', 'digits_between' => 'Atribut :attribute harus antara :min dan :max digit.',
'dimensions' => 'The :attribute has invalid image dimensions.', 'dimensions' => 'Atribut :attribute memiliki dimensi gambar yang tidak valid.',
'distinct' => 'The :attribute field has a duplicate value.', 'distinct' => 'Atribut :attribute memiliki nilai yang duplikat.',
'email' => 'The :attribute must be a valid email address.', 'email' => 'Atribut :attribute harus alamat email yang valid.',
'ends_with' => 'The :attribute must end with one of the following: :values.', 'ends_with' => 'Atribut :attribute harus diakhiri dengan salah satu dari berikut ini: :values.',
'enum' => 'The selected :attribute is invalid.', 'enum' => 'Atribut :attribute yang dipilih tidak valid.',
'exists' => 'The selected :attribute is invalid.', 'exists' => 'Atribut :attribute yang dipilih tidak valid.',
'file' => 'The :attribute must be a file.', 'file' => 'Atribut :attribute harus berupa berkas.',
'filled' => 'The :attribute field must have a value.', 'filled' => 'Atribut :attribute harus memiliki nilai.',
'gt' => [ 'gt' => [
'numeric' => 'The :attribute must be greater than :value.', 'numeric' => 'Atribut :attribute harus lebih besar dari :value.',
'file' => 'The :attribute must be greater than :value kilobytes.', 'file' => 'Atribut :attribute harus lebih besar dari :value kilobita.',
'string' => 'The :attribute must be greater than :value characters.', 'string' => 'Atribut :attribute harus lebih besar dari :value karakter.',
'array' => 'The :attribute must have more than :value items.', 'array' => 'Atribut :attribute harus memiliki lebih dari :value item.',
], ],
'gte' => [ 'gte' => [
'numeric' => 'The :attribute must be greater than or equal to :value.', 'numeric' => 'Atribut :attribute harus lebih besar dari atau sama dengan :value.',
'file' => 'The :attribute must be greater than or equal to :value kilobytes.', 'file' => 'Atribut :attribute harus lebih besar dari atau sama dengan :value kilobita.',
'string' => 'The :attribute must be greater than or equal to :value characters.', 'string' => 'Atribut :attribute harus lebih besar dari atau sama dengan :value karakter.',
'array' => 'The :attribute must have :value items or more.', 'array' => 'Atribut :attribute harus memiliki :value item atau lebih.',
], ],
'image' => 'The :attribute must be an image.', 'image' => 'Atribut :attribute harus berupa gambar.',
'in' => 'The selected :attribute is invalid.', 'in' => 'Atribut :attribute yang dipilih tidak valid.',
'in_array' => 'The :attribute field does not exist in :other.', 'in_array' => 'Atribut :attribute tidak ada dalam :other.',
'integer' => 'The :attribute must be an integer.', 'integer' => 'Atribut :attribute harus berupa bilangan bulat.',
'ip' => 'The :attribute must be a valid IP address.', 'ip' => 'Atribut :attribute harus alamat IP yang valid.',
'ipv4' => 'The :attribute must be a valid IPv4 address.', 'ipv4' => 'Atribut :attribute harus alamat IPv4 yang valid.',
'ipv6' => 'The :attribute must be a valid IPv6 address.', 'ipv6' => 'Atribut :attribute harus alamat IPv6 yang valid.',
'json' => 'The :attribute must be a valid JSON string.', 'json' => 'Atribut :attribute harus berupa string JSON yang valid.',
'lt' => [ 'lt' => [
'numeric' => 'The :attribute must be less than :value.', 'numeric' => 'Atribut :attribute harus kurang dari :value.',
'file' => 'The :attribute must be less than :value kilobytes.', 'file' => 'Atribut :attribute harus kurang dari :value kilobita.',
'string' => 'The :attribute must be less than :value characters.', 'string' => 'Atribut :attribute harus kurang dari :value karakter.',
'array' => 'The :attribute must have less than :value items.', 'array' => 'Atribut :attribute harus memiliki kurang dari :value item.',
], ],
'lte' => [ 'lte' => [
'numeric' => 'The :attribute must be less than or equal to :value.', 'numeric' => 'Atribut :attribute harus kurang dari atau sama dengan :value.',
'file' => 'The :attribute must be less than or equal to :value kilobytes.', 'file' => 'Atribut :attribute harus kurang dari atau sama dengan :value kilobita.',
'string' => 'The :attribute must be less than or equal to :value characters.', 'string' => 'Atribut :attribute harus kurang dari atau sama dengan :value karakter.',
'array' => 'The :attribute must not have more than :value items.', 'array' => 'Atribut :attribute tidak boleh memiliki lebih dari :value item.',
], ],
'mac_address' => 'The :attribute must be a valid MAC address.', 'mac_address' => 'Atribut :attribute harus alamat MAC yang valid.',
'max' => [ 'max' => [
'numeric' => 'The :attribute must not be greater than :max.', 'numeric' => 'Atribut :attribute tidak boleh lebih dari :max.',
'file' => 'The :attribute must not be greater than :max kilobytes.', 'file' => 'Atribut :attribute tidak boleh lebih dari :max kilobita.',
'string' => 'The :attribute must not be greater than :max characters.', 'string' => 'Atribut :attribute tidak boleh lebih dari :max karakter.',
'array' => 'The :attribute must not have more than :max items.', 'array' => 'Atribut :attribute tidak boleh memiliki lebih dari :max item.',
], ],
'mimes' => 'The :attribute must be a file of type: :values.', 'mimes' => 'Atribut :attribute harus berupa berkas dengan tipe: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'Atribut :attribute harus berupa berkas dengan tipe: :values.',
'min' => [ 'min' => [
'numeric' => 'The :attribute must be at least :min.', 'numeric' => 'Atribut :attribute harus setidaknya :min.',
'file' => 'The :attribute must be at least :min kilobytes.', 'file' => 'Atribut :attribute harus setidaknya :min kilobita.',
'string' => 'The :attribute must be at least :min characters.', 'string' => 'Atribut :attribute harus setidaknya :min karakter.',
'array' => 'The :attribute must have at least :min items.', 'array' => 'Atribut :attribute harus memiliki setidaknya :min item.',
], ],
'multiple_of' => 'The :attribute must be a multiple of :value.', 'multiple_of' => 'Atribut :attribute harus merupakan kelipatan dari :value.',
'not_in' => 'The selected :attribute is invalid.', 'not_in' => 'Atribut :attribute yang dipilih tidak valid.',
'not_regex' => 'The :attribute format is invalid.', 'not_regex' => 'Format :attribute tidak valid.',
'numeric' => 'The :attribute must be a number.', 'numeric' => 'Atribut :attribute harus berupa angka.',
'password' => 'The password is incorrect.', 'password' => 'Kata sandi salah.',
'present' => 'The :attribute field must be present.', 'present' => 'Atribut :attribute harus ada.',
'prohibited' => 'The :attribute field is prohibited.', 'prohibited' => 'Atribut :attribute tidak diperbolehkan.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 'prohibited_if' => 'Atribut :attribute tidak diperbolehkan ketika :other adalah :value.',
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', 'prohibited_unless' => 'Atribut :attribute tidak diperbolehkan kecuali :other ada dalam :values.',
'prohibits' => 'The :attribute field prohibits :other from being present.', 'prohibits' => 'Atribut :attribute melarang kehadiran :other.',
'regex' => 'The :attribute format is invalid.', 'regex' => 'Format :attribute tidak valid.',
'required' => 'The :attribute field is required.', 'required' => 'Atribut :attribute wajib diisi.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.', 'required_array_keys' => 'Atribut :attribute harus berisi entri untuk: :values.',
'required_if' => 'The :attribute field is required when :other is :value.', 'required_if' => 'Atribut :attribute wajib diisi ketika :other adalah :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.', 'required_unless' => 'Atribut :attribute wajib diisi kecuali :other ada dalam :values.',
'required_with' => 'The :attribute field is required when :values is present.', 'required_with' => 'Atribut :attribute wajib diisi ketika :values ada.',
'required_with_all' => 'The :attribute field is required when :values are present.', 'required_with_all' => 'Atribut :attribute wajib diisi ketika semua dari :values ada.',
'required_without' => 'The :attribute field is required when :values is not present.', 'required_without' => 'Atribut :attribute wajib diisi ketika :values tidak ada.',
'required_without_all' => 'The :attribute field is required when none of :values are present.', 'required_without_all' => 'Atribut :attribute wajib diisi ketika tidak ada dari :values ada.',
'same' => 'The :attribute and :other must match.', 'same' => 'Atribut :attribute dan :other harus cocok.',
'size' => [ 'size' => [
'numeric' => 'The :attribute must be :size.', 'numeric' => 'Atribut :attribute harus :size.',
'file' => 'The :attribute must be :size kilobytes.', 'file' => 'Atribut :attribute harus :size kilobita.',
'string' => 'The :attribute must be :size characters.', 'string' => 'Atribut :attribute harus :size karakter.',
'array' => 'The :attribute must contain :size items.', 'array' => 'Atribut :attribute harus memiliki :size item.',
], ],
'starts_with' => 'The :attribute must start with one of the following: :values.', 'starts_with' => 'Atribut :attribute harus dimulai dengan salah satu dari berikut ini: :values.',
'string' => 'The :attribute must be a string.', 'string' => 'Atribut :attribute harus berupa string.',
'timezone' => 'The :attribute must be a valid timezone.', 'timezone' => 'Atribut :attribute harus zona waktu yang valid.',
'unique' => 'The :attribute has already been taken.', 'unique' => 'Atribut :attribute sudah ada sebelumnya.',
'uploaded' => 'The :attribute failed to upload.', 'uploaded' => 'Atribut :attribute gagal diunggah.',
'url' => 'The :attribute must be a valid URL.', 'url' => 'Atribut :attribute harus URL yang valid.',
'uuid' => 'The :attribute must be a valid UUID.', 'uuid' => 'Atribut :attribute harus UUID yang valid.',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -10,8 +10,8 @@
<meta content="" name="keywords"> <meta content="" name="keywords">
<!-- Favicons --> <!-- Favicons -->
<link href="{{ asset('backend/assets/img/favicon.png')}}" rel="icon"> <link href="{{ asset('backend/assets/img/logoPolije.png')}}" rel="icon">
<link href="{{ asset('backend/assets/img/apple-touch-icon.png')}}" rel="apple-touch-icon"> <link href="{{ asset('backend/assets/img/logoPolije.png')}}" rel="apple-touch-icon">
<!-- Google Fonts --> <!-- Google Fonts -->
<link href="https://fonts.gstatic.com" rel="preconnect"> <link href="https://fonts.gstatic.com" rel="preconnect">
@ -45,7 +45,7 @@
<div class="d-flex align-items-center justify-content-between"> <div class="d-flex align-items-center justify-content-between">
<a href="#" class="logo d-flex align-items-center"> <a href="#" class="logo d-flex align-items-center">
<img src="{{ asset('backend/assets/img/logo.png')}}" alt=""> <img src="{{ asset('backend/assets/img/logoPolije.png')}}" alt="">
<span class="d-none d-lg-block">{{config('app.name')}}</span> <span class="d-none d-lg-block">{{config('app.name')}}</span>
</a> </a>
<i class="bi bi-list toggle-sidebar-btn"></i> <i class="bi bi-list toggle-sidebar-btn"></i>
@ -72,14 +72,14 @@
<!-- ======= Footer ======= --> <!-- ======= Footer ======= -->
<footer id="footer" class="footer"> <footer id="footer" class="footer">
<div class="copyright"> <div class="copyright">
&copy; Copyright <strong><span>NiceAdmin</span></strong>. All Rights Reserved &copy; Copyright <strong><span>Metacognitif</span></strong>. All Rights Reserved
</div> </div>
<div class="credits"> <div class="credits">
<!-- All the links in the footer should remain intact. --> <!-- All the links in the footer should remain intact. -->
<!-- You can delete the links only if you purchased the pro version. --> <!-- You can delete the links only if you purchased the pro version. -->
<!-- Licensing information: https://bootstrapmade.com/license/ --> <!-- Licensing information: https://bootstrapmade.com/license/ -->
<!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ --> <!-- Purchase the pro version with working PHP/AJAX contact form: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/ -->
Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> {{-- Designed by <a href="https://bootstrapmade.com/">BootstrapMade</a> --}}
</div> </div>
</footer><!-- End Footer --> </footer><!-- End Footer -->

View File

@ -4,7 +4,7 @@
<div class="container-fluid container-xl d-flex align-items-center justify-content-between"> <div class="container-fluid container-xl d-flex align-items-center justify-content-between">
<a href="/" class="logo d-flex align-items-center"> <a href="/" class="logo d-flex align-items-center">
<img src="{{ asset('frontend/assets/img/logo.png')}}" alt=""> <img src="{{ asset('frontend/assets/img/LogoPolije.png')}}" alt="">
<span>{{config('app.name')}}</span> <span>{{config('app.name')}}</span>
</a> </a>

View File

@ -10,8 +10,8 @@
<meta content="" name="keywords"> <meta content="" name="keywords">
<!-- Favicons --> <!-- Favicons -->
<link href="{{ asset('frontend/assets/img/favicon.png')}}" rel="icon"> <link href="{{ asset('frontend/assets/img/LogoPolije.png')}}" rel="icon">
<link href="{{ asset('frontend/assets/img/apple-touch-icon.png')}}" rel="apple-touch-icon"> <link href="{{ asset('frontend/assets/img/LogoPolije.png')}}" rel="apple-touch-icon">
<!-- Google Fonts --> <!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">