Files
sam-api/app/Http/Requests/V1/Report/ExpenseEstimateRequest.php
hskwon 77914da7b7 feat: 보고서(Reports) API 구현
- 일일 일보 조회/엑셀 다운로드 API 추가
- 지출 예상 내역서 조회/엑셀 다운로드 API 추가
- ReportService: 전일/당일 잔액 계산, 월별 지출 예상 집계
- Laravel Excel을 이용한 엑셀 내보내기 구현
- Swagger 문서 작성 완료
2025-12-17 22:51:17 +09:00

47 lines
928 B
PHP

<?php
namespace App\Http\Requests\V1\Report;
use Illuminate\Foundation\Http\FormRequest;
class ExpenseEstimateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'year_month' => ['nullable', 'regex:/^\d{4}-\d{2}$/'],
];
}
/**
* Custom attribute names
*/
public function attributes(): array
{
return [
'year_month' => __('validation.attributes.year_month'),
];
}
/**
* Custom validation messages
*/
public function messages(): array
{
return [
'year_month.regex' => __('validation.date_format', ['format' => 'YYYY-MM']),
];
}
}