siakad-itm/app/Http/Requests/Admin/Manage/Announcement/AnnouncementRequest.php
Yoga Pangestu 353829e053
Some checks failed
tests / ci (pull_request) Has been cancelled
feat: Refactor Admin Manage structure into sub-namespaces for better organization
- Created sub-namespaces under Admin\Manage for Course, Academic, Announcement, Finance, and Service.
- Added new FormRequest classes for handling validation in each sub-namespace.
- Implemented Service classes for managing business logic related to each resource.
- Updated routes to reflect the new sub-namespace structure.
- Enhanced code organization and maintainability by grouping related functionalities.
2026-08-25 21:17:48 +07:00

25 lines
605 B
PHP

<?php
namespace App\Http\Requests\Admin\Manage\Announcement;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class AnnouncementRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'title' => ['required', 'string', 'max:200'],
'content' => ['required', 'string'],
'department_id' => ['nullable', 'integer', Rule::exists('departments', 'id')],
'enrollment_year' => ['nullable', 'integer', 'digits:4'],
];
}
}