- DashboardService: summary(), charts(), approvals() 메서드 구현 - DashboardController: 3개 엔드포인트 (summary, charts, approvals) - FormRequest: DashboardChartsRequest, DashboardApprovalsRequest - Swagger: DashboardApi.php 문서 작성 - i18n: dashboard 관련 메시지 키 추가 - 라우트: /api/v1/dashboard/* 엔드포인트 등록 Phase 2 대시보드(3.3) 완료
29 lines
583 B
PHP
29 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V1\Dashboard;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class DashboardApprovalsRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'limit' => ['nullable', 'integer', 'min:1', 'max:50'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'limit.min' => __('error.validation.min', ['min' => 1]),
|
|
'limit.max' => __('error.validation.max', ['max' => 50]),
|
|
];
|
|
}
|
|
}
|