prod #7

Merged
klllst merged 40 commits from feature/task-7 into master 2024-06-16 12:25:52 +04:00
Showing only changes of commit 65c47fe151 - Show all commits

View File

@ -2,6 +2,7 @@
namespace App\Services;
use App\Enums\ScoreEnum;
use App\Models\Student;
use App\Models\User;
use Illuminate\Pagination\LengthAwarePaginator;
@ -27,6 +28,9 @@ class StudentService implements ServiceInterface
'grade_id' => $data['grade_id'],
]);
$student->user()->save($user);
$student
->lessons()
->syncWithPivotValues($student->grade->lessons->pluck('id')->all(), ['score' => ScoreEnum::WithoutScore]);
return $student;
}