Files
sam-api/app/Http/Requests/Tenant/TenantUpdateRequest.php
kent 7fa03caffc fix: 회사정보 로고 삭제 기능 수정
- TenantUpdateRequest에 logo 필드 규칙 추가
- logo: null 전송 시 validated()에서 무시되던 문제 해결

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-30 22:37:00 +09:00

40 lines
1.4 KiB
PHP

<?php
namespace App\Http\Requests\Tenant;
use Illuminate\Foundation\Http\FormRequest;
class TenantUpdateRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'tenant_id' => 'required|integer|exists:tenants,id',
'company_name' => 'sometimes|string|max:100',
'email' => 'nullable|email|max:100',
'phone' => 'nullable|string|max:20',
'address' => 'nullable|string|max:255',
'business_num' => 'nullable|string|max:20',
'ceo_name' => 'nullable|string|max:100',
'logo' => 'nullable|string|max:255',
// 확장 필드 (JSON)
'options' => 'nullable|array',
'options.business_type' => 'nullable|string|max:100',
'options.business_category' => 'nullable|string|max:100',
'options.zip_code' => 'nullable|string|max:10',
'options.address_detail' => 'nullable|string|max:255',
'options.tax_invoice_email' => 'nullable|email|max:100',
'options.manager_name' => 'nullable|string|max:100',
'options.payment_bank' => 'nullable|string|max:100',
'options.payment_account' => 'nullable|string|max:50',
'options.payment_account_holder' => 'nullable|string|max:100',
'options.payment_day' => 'nullable|string|max:10',
];
}
}