diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index cc08688..c84ae48 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -50,11 +50,15 @@ public function __construct() protected function validator(array $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'], 'semester' => ['required', 'integer', 'max:12'], - 'angkatan' => ['required', 'integer', 'max:2250'], - 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'angkatan' => ['required', 'integer', 'min:2021', 'max:2023'], + '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'], ]); } @@ -74,10 +78,10 @@ protected function create(array $data) 'angkatan' => $data['angkatan'], 'email' => $data['email'], 'password' => Hash::make($data['password']), - 'foto' => 'images/2xUcdtkygOf0aM2EvXuKFLXLOBlEuXNPT21Oeo15.png', + // 'foto' => 'images/2xUcdtkygOf0aM2EvXuKFLXLOBlEuXNPT21Oeo15.png', 'kelas_user' => '3', - 'foto' => 'images/BoeaT0jCWccM0FW9FxE1HS1ej5J61n99JbEBzWlS.jpg', - + 'foto' => 'images/defaultProfile.jpg', + ]); } } diff --git a/public/backend/assets/img/logoPolije.png b/public/backend/assets/img/logoPolije.png new file mode 100644 index 0000000..bdea441 Binary files /dev/null and b/public/backend/assets/img/logoPolije.png differ diff --git a/public/frontend/assets/img/LogoPolije.png b/public/frontend/assets/img/LogoPolije.png new file mode 100644 index 0000000..bdea441 Binary files /dev/null and b/public/frontend/assets/img/LogoPolije.png differ diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 783003c..f25a775 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -1,134 +1,122 @@ '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.', + 'accepted' => 'Atribut :attribute harus diterima.', + 'accepted_if' => 'Atribut :attribute harus diterima ketika :other adalah :value.', + 'active_url' => 'Atribut :attribute bukan URL yang valid.', + '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.', + 'alpha_dash' => 'Atribut :attribute hanya boleh berisi huruf, angka, tanda hubung, dan garis bawah.', + 'alpha_num' => 'Atribut :attribute hanya boleh berisi huruf dan angka.', + '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.', '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.', + 'numeric' => 'Atribut :attribute harus antara :min dan :max.', + 'file' => 'Atribut :attribute harus antara :min dan :max kilobita.', + 'string' => 'Atribut :attribute harus antara :min dan :max karakter.', + 'array' => 'Atribut :attribute harus memiliki antara :min dan :max item.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'declined' => 'The :attribute must be declined.', - 'declined_if' => 'The :attribute must be declined when :other is :value.', - '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.', - 'ends_with' => 'The :attribute must end with one of the following: :values.', - 'enum' => 'The selected :attribute is invalid.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', + 'boolean' => 'Atribut :attribute harus benar atau salah.', + 'confirmed' => 'Konfirmasi :attribute tidak cocok.', + 'current_password' => 'Kata sandi salah.', + 'date' => 'Atribut :attribute bukan tanggal yang valid.', + 'date_equals' => 'Atribut :attribute harus tanggal yang sama dengan :date.', + 'date_format' => 'Atribut :attribute tidak cocok dengan format :format.', + 'declined' => 'Atribut :attribute harus ditolak.', + 'declined_if' => 'Atribut :attribute harus ditolak ketika :other adalah :value.', + 'different' => 'Atribut :attribute dan :other harus berbeda.', + 'digits' => 'Atribut :attribute harus :digits digit.', + 'digits_between' => 'Atribut :attribute harus antara :min dan :max digit.', + 'dimensions' => 'Atribut :attribute memiliki dimensi gambar yang tidak valid.', + 'distinct' => 'Atribut :attribute memiliki nilai yang duplikat.', + 'email' => 'Atribut :attribute harus alamat email yang valid.', + 'ends_with' => 'Atribut :attribute harus diakhiri dengan salah satu dari berikut ini: :values.', + 'enum' => 'Atribut :attribute yang dipilih tidak valid.', + 'exists' => 'Atribut :attribute yang dipilih tidak valid.', + 'file' => 'Atribut :attribute harus berupa berkas.', + 'filled' => 'Atribut :attribute harus memiliki nilai.', 'gt' => [ - 'numeric' => 'The :attribute must be greater than :value.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', + 'numeric' => 'Atribut :attribute harus lebih besar dari :value.', + 'file' => 'Atribut :attribute harus lebih besar dari :value kilobita.', + 'string' => 'Atribut :attribute harus lebih besar dari :value karakter.', + 'array' => 'Atribut :attribute harus memiliki lebih dari :value item.', ], 'gte' => [ - 'numeric' => 'The :attribute must be greater than or equal to :value.', - 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', - 'string' => 'The :attribute must be greater than or equal to :value characters.', - 'array' => 'The :attribute must have :value items or more.', + 'numeric' => 'Atribut :attribute harus lebih besar dari atau sama dengan :value.', + 'file' => 'Atribut :attribute harus lebih besar dari atau sama dengan :value kilobita.', + 'string' => 'Atribut :attribute harus lebih besar dari atau sama dengan :value karakter.', + 'array' => 'Atribut :attribute harus memiliki :value item atau lebih.', ], - '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.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', + 'image' => 'Atribut :attribute harus berupa gambar.', + 'in' => 'Atribut :attribute yang dipilih tidak valid.', + 'in_array' => 'Atribut :attribute tidak ada dalam :other.', + 'integer' => 'Atribut :attribute harus berupa bilangan bulat.', + 'ip' => 'Atribut :attribute harus alamat IP yang valid.', + 'ipv4' => 'Atribut :attribute harus alamat IPv4 yang valid.', + 'ipv6' => 'Atribut :attribute harus alamat IPv6 yang valid.', + 'json' => 'Atribut :attribute harus berupa string JSON yang valid.', 'lt' => [ - 'numeric' => 'The :attribute must be less than :value.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', + 'numeric' => 'Atribut :attribute harus kurang dari :value.', + 'file' => 'Atribut :attribute harus kurang dari :value kilobita.', + 'string' => 'Atribut :attribute harus kurang dari :value karakter.', + 'array' => 'Atribut :attribute harus memiliki kurang dari :value item.', ], 'lte' => [ - 'numeric' => 'The :attribute must be less than or equal to :value.', - 'file' => 'The :attribute must be less than or equal to :value kilobytes.', - 'string' => 'The :attribute must be less than or equal to :value characters.', - 'array' => 'The :attribute must not have more than :value items.', + 'numeric' => 'Atribut :attribute harus kurang dari atau sama dengan :value.', + 'file' => 'Atribut :attribute harus kurang dari atau sama dengan :value kilobita.', + 'string' => 'Atribut :attribute harus kurang dari atau sama dengan :value karakter.', + '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' => [ - 'numeric' => 'The :attribute must not be greater than :max.', - 'file' => 'The :attribute must not be greater than :max kilobytes.', - 'string' => 'The :attribute must not be greater than :max characters.', - 'array' => 'The :attribute must not have more than :max items.', + 'numeric' => 'Atribut :attribute tidak boleh lebih dari :max.', + 'file' => 'Atribut :attribute tidak boleh lebih dari :max kilobita.', + 'string' => 'Atribut :attribute tidak boleh lebih dari :max karakter.', + 'array' => 'Atribut :attribute tidak boleh memiliki lebih dari :max item.', ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'mimes' => 'Atribut :attribute harus berupa berkas dengan tipe: :values.', + 'mimetypes' => 'Atribut :attribute harus berupa berkas dengan tipe: :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.', + 'numeric' => 'Atribut :attribute harus setidaknya :min.', + 'file' => 'Atribut :attribute harus setidaknya :min kilobita.', + 'string' => 'Atribut :attribute harus setidaknya :min karakter.', + 'array' => 'Atribut :attribute harus memiliki setidaknya :min item.', ], - 'multiple_of' => 'The :attribute must be a multiple of :value.', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'password' => 'The password is incorrect.', - 'present' => 'The :attribute field must be present.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_array_keys' => 'The :attribute field must contain entries for: :values.', - '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 are 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.', + 'multiple_of' => 'Atribut :attribute harus merupakan kelipatan dari :value.', + 'not_in' => 'Atribut :attribute yang dipilih tidak valid.', + 'not_regex' => 'Format :attribute tidak valid.', + 'numeric' => 'Atribut :attribute harus berupa angka.', + 'password' => 'Kata sandi salah.', + 'present' => 'Atribut :attribute harus ada.', + 'prohibited' => 'Atribut :attribute tidak diperbolehkan.', + 'prohibited_if' => 'Atribut :attribute tidak diperbolehkan ketika :other adalah :value.', + 'prohibited_unless' => 'Atribut :attribute tidak diperbolehkan kecuali :other ada dalam :values.', + 'prohibits' => 'Atribut :attribute melarang kehadiran :other.', + 'regex' => 'Format :attribute tidak valid.', + 'required' => 'Atribut :attribute wajib diisi.', + 'required_array_keys' => 'Atribut :attribute harus berisi entri untuk: :values.', + 'required_if' => 'Atribut :attribute wajib diisi ketika :other adalah :value.', + 'required_unless' => 'Atribut :attribute wajib diisi kecuali :other ada dalam :values.', + 'required_with' => 'Atribut :attribute wajib diisi ketika :values ada.', + 'required_with_all' => 'Atribut :attribute wajib diisi ketika semua dari :values ada.', + 'required_without' => 'Atribut :attribute wajib diisi ketika :values tidak ada.', + 'required_without_all' => 'Atribut :attribute wajib diisi ketika tidak ada dari :values ada.', + 'same' => 'Atribut :attribute dan :other harus cocok.', '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.', + 'numeric' => 'Atribut :attribute harus :size.', + 'file' => 'Atribut :attribute harus :size kilobita.', + 'string' => 'Atribut :attribute harus :size karakter.', + 'array' => 'Atribut :attribute harus memiliki :size item.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values.', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid timezone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute must be a valid URL.', - 'uuid' => 'The :attribute must be a valid UUID.', + 'starts_with' => 'Atribut :attribute harus dimulai dengan salah satu dari berikut ini: :values.', + 'string' => 'Atribut :attribute harus berupa string.', + 'timezone' => 'Atribut :attribute harus zona waktu yang valid.', + 'unique' => 'Atribut :attribute sudah ada sebelumnya.', + 'uploaded' => 'Atribut :attribute gagal diunggah.', + 'url' => 'Atribut :attribute harus URL yang valid.', + 'uuid' => 'Atribut :attribute harus UUID yang valid.', /* |-------------------------------------------------------------------------- diff --git a/resources/views/backend/layouts/template.blade.php b/resources/views/backend/layouts/template.blade.php index b3e0c16..249c6a3 100644 --- a/resources/views/backend/layouts/template.blade.php +++ b/resources/views/backend/layouts/template.blade.php @@ -10,8 +10,8 @@ - - + + @@ -45,7 +45,7 @@
@@ -72,14 +72,14 @@ diff --git a/resources/views/frontend/layouts/navbar.blade.php b/resources/views/frontend/layouts/navbar.blade.php index 4d2df30..d7825bd 100644 --- a/resources/views/frontend/layouts/navbar.blade.php +++ b/resources/views/frontend/layouts/navbar.blade.php @@ -4,7 +4,7 @@
diff --git a/resources/views/frontend/layouts/template.blade.php b/resources/views/frontend/layouts/template.blade.php index 1e68416..2d773bd 100644 --- a/resources/views/frontend/layouts/template.blade.php +++ b/resources/views/frontend/layouts/template.blade.php @@ -10,8 +10,8 @@ - - + +