siakad-itm/app/Http/Requests/Admin/Manage/SaveCourseRegistrationRequest.php
Yoga Pangestu 692b84cc1b feat: add open semesters badge to academic terms and remove course registration pages
- Added a new column to display open semesters in the academic terms table with badges.
- Removed course registration related pages and components including index, create, and show.
- Updated course registration types to reflect changes in the data structure.
- Refactored admin routes for course registrations to streamline submission handling.
2026-09-01 21:39:46 +07:00

26 lines
603 B
PHP

<?php
namespace App\Http\Requests\Admin\Manage;
use Illuminate\Foundation\Http\FormRequest;
class SaveCourseRegistrationRequest extends FormRequest
{
public function authorize(): bool
{
$student = $this->route('student');
return $this->user()->hasRole('mahasiswa')
&& $this->user()->student?->id === $student?->id;
}
public function rules(): array
{
return [
'course_class_ids' => ['array'],
'course_class_ids.*' => ['integer'],
'signature' => ['nullable', 'file', 'image', 'max:2048'],
];
}
}