- POST /api/v1/tenants/logo 엔드포인트 추가
- TenantLogoUploadRequest: 이미지 유효성 검사 (jpeg, png, gif, webp, 5MB)
- TenantService.uploadLogo(): 기존 로고 삭제 후 새 로고 저장
- 저장 경로: /storage/tenants/{tenant_id}/logo_{timestamp}.{ext}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
30 lines
833 B
PHP
30 lines
833 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Tenant;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class TenantLogoUploadRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'logo' => 'required|image|mimes:jpeg,png,gif,webp|max:5120', // 5MB
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'logo.required' => __('validation.required', ['attribute' => '로고 이미지']),
|
|
'logo.image' => __('validation.image', ['attribute' => '로고']),
|
|
'logo.mimes' => __('validation.mimes', ['attribute' => '로고', 'values' => 'jpeg, png, gif, webp']),
|
|
'logo.max' => __('validation.max.file', ['attribute' => '로고', 'max' => '5MB']),
|
|
];
|
|
}
|
|
} |