Skip to content

Commit

Permalink
added reply to column
Browse files Browse the repository at this point in the history
  • Loading branch information
cannycookie committed Aug 19, 2024
1 parent 5b833b2 commit b6908c7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
33 changes: 33 additions & 0 deletions database/migrations/update_email_templates_table.php.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table(config('filament-email-templates.table_name'), function (Blueprint $table) {
$table->json('reply_to')->nullable();
});

}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table(config('filament-email-templates.table_name'), function (Blueprint $table) {
$table->dropColumn('reply_to');
});
}
};
2 changes: 1 addition & 1 deletion src/EmailTemplatesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class EmailTemplatesServiceProvider extends PackageServiceProvider
public function configurePackage(Package $package): void
{
$package->name("filament-email-templates")
->hasMigrations(['create_email_templates_themes_table','create_email_templates_table'])
->hasMigrations(['create_email_templates_themes_table','create_email_templates_table','update_email_templates_table'])
->hasConfigFile(['filament-email-templates', 'filament-tiptap-editor'])
->hasAssets()
->hasViews('vb-email-templates')
Expand Down
3 changes: 3 additions & 0 deletions src/Models/EmailTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @property int $id
* @property string $key
* @property array $from
* @property array $reply_to
* @property string $name
* @property string $view
* @property object $cc
Expand Down Expand Up @@ -51,6 +52,7 @@ class EmailTemplate extends Model
'content',
'language',
'logo',
'reply_to'

];

Expand All @@ -62,6 +64,7 @@ class EmailTemplate extends Model
'created_at' => 'datetime:Y-m-d H:i:s',
'updated_at' => 'datetime:Y-m-d H:i:s',
'from' => 'array',
'reply_to' => 'array',
];
/**
* @var string[]
Expand Down

0 comments on commit b6908c7

Please sign in to comment.