Skip to content

Commit

Permalink
Fixes coding style with pint
Browse files Browse the repository at this point in the history
  • Loading branch information
iqbaleff214 authored and github-actions[bot] committed Jun 4, 2024
1 parent 3910252 commit 6bae4bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/Student.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ protected static function boot(): void
if (is_null($student->student_id_number)) {
$studentIdNumber = $student->gender === 'male' ? 'I' : 'A';
$studentIdNumber .= now()->toHijri()->isoFormat('YYMM');
$number = Student::where('student_id_number', 'LIKE', $studentIdNumber . '%')->count() + 1;
$student->student_id_number = $studentIdNumber . str_pad($number, 3, '0',STR_PAD_LEFT);
$number = Student::where('student_id_number', 'LIKE', $studentIdNumber.'%')->count() + 1;
$student->student_id_number = $studentIdNumber.str_pad($number, 3, '0', STR_PAD_LEFT);
}
});
static::deleting(function (Student $student) {
Expand Down

0 comments on commit 6bae4bf

Please sign in to comment.