generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support to attachments. Optimized getSearchableFields method fo…
…r Email model.
- Loading branch information
1 parent
6bf9e66
commit 0ba9712
Showing
10 changed files
with
161 additions
and
21 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
database/migrations/add_attachments_field_to_filament_email_log_table.php.stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?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('filament_email_log', function (Blueprint $table) { | ||
$table->longText('attachments')->nullable()->default(null); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::table('filament_email_log', function (Blueprint $table) { | ||
$table->dropColumn('attachments'); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div> | ||
@if(!empty($getRecord()->attachments)) | ||
<ul class="max-w-md divide-y divide-gray-200 dark:divide-gray-700"> | ||
@foreach(json_decode($getRecord()->attachments) as $attachment) | ||
<li class="pb-4 pt-4 sm:pb-4"> | ||
<div class="flex items-center space-x-4 rtl:space-x-reverse"> | ||
<div class="flex-1 min-w-0"> | ||
<p class="text-sm font-medium text-gray-900 truncate dark:text-white"> | ||
<strong>{{ $attachment->name }}</strong> | ||
</p> | ||
</div> | ||
<div class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white"> | ||
{{ ($this->downloadAction)(['path' => $attachment->path, 'name' => $attachment->name , 'type' => $attachment->contentType]) }} | ||
</div> | ||
</div> | ||
</li> | ||
@endforeach | ||
</ul> | ||
@endif | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters