- Implemented LecturerEdit and LecturerIndex components for managing lecturers. - Created StudentCreate and StudentEdit components for adding and editing students. - Developed StudentIndex component for listing students with search and pagination. - Added department and user types for better type safety. - Updated routes for lecturers and students, including reset password functionality. - Removed AppSidebar from dashboard for a cleaner layout.
29 lines
675 B
PHP
29 lines
675 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Master;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class DepartmentRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'code' => [
|
|
'required',
|
|
'string',
|
|
'max:10',
|
|
Rule::unique('departments')->ignore($this->route('department')),
|
|
],
|
|
'name' => ['required', 'string', 'max:100'],
|
|
'degree_level' => ['nullable', 'string', Rule::in(['D3', 'D4', 'S1', 'S2', 'S3'])],
|
|
];
|
|
}
|
|
}
|