feat(api): organisation email branding and shared mail layout
- 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>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('organisations', function (Blueprint $table) {
|
||||
$table->string('email_logo_url', 500)->nullable()->after('settings');
|
||||
$table->string('email_primary_color', 7)->nullable()->after('email_logo_url');
|
||||
$table->string('email_reply_to')->nullable()->after('email_primary_color');
|
||||
$table->string('email_sender_name', 100)->nullable()->after('email_reply_to');
|
||||
$table->text('email_footer_text')->nullable()->after('email_sender_name');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('organisations', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'email_logo_url',
|
||||
'email_primary_color',
|
||||
'email_reply_to',
|
||||
'email_sender_name',
|
||||
'email_footer_text',
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user