feat: add Filament packages for enhanced admin functionality

- Add backstage/filament-mails for mail management interface
  - Add binarybuilds/filament-failed-jobs for failed job monitoring
  - Add gboquizosanchez/filament-log-viewer for application log viewing
  - Add jacobtims/filament-logger for enhanced logging capabilities
  - Extend Filament admin panel with comprehensive monitoring tools
  - Improve developer experience with better visibility into system operations
This commit is contained in:
idevakk
2025-11-17 06:33:07 -08:00
parent e330c4f90e
commit bbbaf3a234
55 changed files with 2598 additions and 67 deletions

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create(config('mails.database.tables.mails'), function (Blueprint $table) {
$table->id();
$table->string('uuid')->nullable()->index();
$table->string('mail_class')->nullable()->index();
$table->string('subject')->nullable();
$table->json('from')->nullable();
$table->json('reply_to')->nullable();
$table->json('to')->nullable();
$table->json('cc')->nullable();
$table->json('bcc')->nullable();
$table->text('html')->nullable();
$table->text('text')->nullable();
$table->unsignedBigInteger('opens')->default(0);
$table->unsignedBigInteger('clicks')->default(0);
$table->timestamp('sent_at')->nullable();
$table->timestamp('resent_at')->nullable();
$table->timestamp('accepted_at')->nullable();
$table->timestamp('delivered_at')->nullable();
$table->timestamp('last_opened_at')->nullable();
$table->timestamp('last_clicked_at')->nullable();
$table->timestamp('complained_at')->nullable();
$table->timestamp('soft_bounced_at')->nullable();
$table->timestamp('hard_bounced_at')->nullable();
$table->timestamp('unsubscribed_at')->nullable();
$table->timestamps();
});
}
};

View File

@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create(config('mails.database.tables.attachments', 'mail_attachments'), function (Blueprint $table) {
$table->id();
$table->foreignIdFor(config('mails.models.mail'))
->constrained()
->cascadeOnDelete();
$table->string('disk');
$table->string('uuid');
$table->string('filename');
$table->string('mime');
$table->boolean('inline', false);
$table->bigInteger('size');
$table->timestamps();
});
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create(config('mails.database.tables.events', 'mail_events'), function (Blueprint $table) {
$table->id();
$table->foreignIdFor(config('mails.models.mail'))
->constrained()
->cascadeOnDelete();
$table->string('type');
$table->string('ip_address')->nullable();
$table->string('hostname')->nullable();
$table->string('platform')->nullable();
$table->string('os')->nullable();
$table->string('browser')->nullable();
$table->string('user_agent')->nullable();
$table->string('city')->nullable();
$table->char('country_code', 2)->nullable();
$table->string('link')->nullable();
$table->string('tag')->nullable();
$table->json('payload')->nullable();
$table->timestamps();
$table->timestamp('occurred_at')->nullable();
});
}
};

View File

@@ -0,0 +1,19 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create(config('mails.database.tables.polymorph'), function (Blueprint $table) {
$table->id();
$table->foreignIdFor(config('mails.models.mail'))
->constrained()
->cascadeOnDelete();
$table->morphs('mailable');
});
}
};

View File

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table(config('mails.database.tables.events', 'mail_events'), function (Blueprint $table): void {
$table->timestamp('unsuppressed_at')
->nullable()
->after('occurred_at');
});
Schema::table(config('mails.database.tables.mails', 'mails'), function (Blueprint $table): void {
$table->string('mailer')
->after('uuid');
$table->string('stream_id')
->nullable()
->after('mailer');
});
}
};

View File

@@ -0,0 +1,17 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table(config('mails.database.tables.mails'), function (Blueprint $table) {
$table->after('clicks', function (Blueprint $table) {
$table->json('tags')->nullable();
});
});
}
};

View File

@@ -0,0 +1,17 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table(config('mails.database.tables.mails', 'mails'), function (Blueprint $table): void {
$table->string('transport')
->nullable()
->after('mailer');
});
}
};

View File

@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table(config('mails.database.tables.mails'), function (Blueprint $table) {
$table->longText('html')->nullable()->change();
$table->longText('text')->nullable()->change();
});
}
public function down()
{
Schema::table(config('mails.database.tables.mails'), function (Blueprint $table) {
$table->text('html')->nullable()->change();
$table->text('text')->nullable()->change();
});
}
};

View File

@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::table(config('mails.database.tables.events', 'mail_events'), function (Blueprint $table) {
$table->longText('link')->nullable()->change();
});
}
public function down()
{
Schema::table(config('mails.database.tables.events', 'mail_events'), function (Blueprint $table) {
$table->string('link')->nullable()->change();
});
}
};

View File

@@ -0,0 +1,27 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivityLogTable extends Migration
{
public function up()
{
Schema::connection(config('activitylog.database_connection'))->create(config('activitylog.table_name'), function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('log_name')->nullable();
$table->text('description');
$table->nullableMorphs('subject', 'subject');
$table->nullableMorphs('causer', 'causer');
$table->json('properties')->nullable();
$table->timestamps();
$table->index('log_name');
});
}
public function down()
{
Schema::connection(config('activitylog.database_connection'))->dropIfExists(config('activitylog.table_name'));
}
}

View File

@@ -0,0 +1,22 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddEventColumnToActivityLogTable extends Migration
{
public function up()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->string('event')->nullable()->after('subject_type');
});
}
public function down()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->dropColumn('event');
});
}
}

View File

@@ -0,0 +1,22 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddBatchUuidColumnToActivityLogTable extends Migration
{
public function up()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->uuid('batch_uuid')->nullable()->after('properties');
});
}
public function down()
{
Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) {
$table->dropColumn('batch_uuid');
});
}
}