- Add email branding columns to organisations table (logo, color, reply-to, sender name, footer)
- Create MailBrandingService for resolving per-org branding with defaults
- Create CrewliMailable abstract base class with branded from/reply-to
- Create shared Blade layout (mail.layouts.crewli) with inline CSS
- Refactor Registration*Mail and InvitationMail to extend CrewliMailable
- Add config/crewli.php for platform-wide defaults (portal_url, app_url, logo)
- Add dev-only /mail-preview/{type} route for browser email previewing
- Update Organisation model, resource, and form requests with branding fields
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Api\V1;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
final class UpdateOrganisationRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/** @return array<string, mixed> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['sometimes', 'string', 'max:255'],
|
|
'slug' => [
|
|
'sometimes', 'string', 'max:255', 'regex:/^[a-z0-9-]+$/',
|
|
Rule::unique('organisations', 'slug')->ignore($this->route('organisation')),
|
|
],
|
|
'billing_status' => ['sometimes', 'string', 'in:active,trial,suspended'],
|
|
'settings' => ['sometimes', 'array'],
|
|
'email_logo_url' => ['nullable', 'url', 'max:500'],
|
|
'email_primary_color' => ['nullable', 'string', 'regex:/^#[0-9A-Fa-f]{6}$/'],
|
|
'email_reply_to' => ['nullable', 'email'],
|
|
'email_sender_name' => ['nullable', 'string', 'max:100'],
|
|
'email_footer_text' => ['nullable', 'string', 'max:2000'],
|
|
];
|
|
}
|
|
}
|