Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ parameters:
paths:
- src
- config
- database
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
7 changes: 4 additions & 3 deletions src/Controllers/MailDownloadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Vormkracht10\FilamentMails\Controllers;

use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Storage;
use Vormkracht10\Mails\Models\MailAttachment;

class MailDownloadController extends Controller
{
Expand All @@ -17,8 +17,9 @@ public function __invoke(...$arguments)
$tenant = null;
}

/** @var MailAttachment $attachment */
$attachment = MailAttachment::find($attachment);
$attachmentModel = Config::get('mails.models.attachment');
/** @var \Vormkracht10\Mails\Models\MailAttachment $attachment */
$attachment = $attachmentModel::find($attachment);

$file = Storage::disk($attachment->disk)->path($attachment->storagePath);

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/SuppressionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function table(Table $table): Table
Tables\Actions\Action::make('unsuppress')
->label(__('Unsuppress'))
->action(function (MailEvent $record) {
event(new MailUnsuppressed(key($record->to), $record->mail->mailer == 'smtp' && filled($record->mail->transport) ? $record->mail->transport : $record->mail->mailer, $record->mail->stream_id ?? null));
event(new MailUnsuppressed(key($record->mail->to), $record->mail->mailer == 'smtp' && filled($record->mail->transport) ? $record->mail->transport : $record->mail->mailer, $record->mail->stream_id ?? null));
})
->visible(fn ($record) => Provider::tryFrom($record->mail->mailer == 'smtp' && filled($record->mail->transport) ? $record->mail->transport : $record->mail->mailer)),

Expand Down