mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 16:32:15 +00:00
controller refactoring part 7
This commit is contained in:
20
src/Domain/Sharing/Actions/SendViaEmailAction.php
Normal file
20
src/Domain/Sharing/Actions/SendViaEmailAction.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace Domain\Sharing\Actions;
|
||||
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Domain\Sharing\Notifications\SharedSendViaEmail;
|
||||
|
||||
class SendViaEmailAction
|
||||
{
|
||||
public function __invoke(
|
||||
array $emails,
|
||||
string $token,
|
||||
): void {
|
||||
foreach ($emails as $email) {
|
||||
Notification::route('mail', $email)
|
||||
->notify(
|
||||
new SharedSendViaEmail($token)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user