- share by email fix

This commit is contained in:
Čarodej
2022-03-25 11:10:35 +01:00
parent 8c1e59d81a
commit d7d95e22ea
6 changed files with 17 additions and 34 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace Domain\Sharing\Actions;
use App\Users\Models\User;
use Spatie\QueueableAction\QueueableAction;
use Illuminate\Support\Facades\Notification;
use Domain\Sharing\Notifications\SharedSendViaEmail;
@@ -12,10 +13,11 @@ class SendViaEmailAction
public function __invoke(
array $emails,
string $token,
User $user,
): void {
foreach ($emails as $email) {
Notification::route('mail', $email)
->notify(new SharedSendViaEmail($token));
->notify(new SharedSendViaEmail($token, $user));
}
}
}