- 모델 6개 (Equipment, InspectionTemplate, Inspection, InspectionDetail, Repair, Process) - 서비스 3개 (Equipment, Inspection, Repair) - API 컨트롤러 3개 + FormRequest 4개 - Blade 컨트롤러 + 라우트 등록 - 뷰: 대시보드, 등록대장(CRUD), 일상점검표(캘린더 그리드), 수리이력
32 lines
698 B
PHP
32 lines
698 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreEquipmentInspectionRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'equipment_id' => 'required|exists:equipments,id',
|
|
'template_item_id' => 'required|exists:equipment_inspection_templates,id',
|
|
'check_date' => 'required|date',
|
|
];
|
|
}
|
|
|
|
public function attributes(): array
|
|
{
|
|
return [
|
|
'equipment_id' => '설비',
|
|
'template_item_id' => '점검항목',
|
|
'check_date' => '점검일',
|
|
];
|
|
}
|
|
}
|