mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-27 02:30:39 +00:00
create team folder
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
namespace Domain\Teams\Notifications;
|
||||
|
||||
use App\Users\Models\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Domain\Folders\Models\Folder;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Domain\Teams\Models\TeamFoldersInvitation;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class InvitationIntoTeamFolder extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(
|
||||
public Folder $teamFolder,
|
||||
public TeamFoldersInvitation $invitation,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the notification's delivery channels.
|
||||
*/
|
||||
public function via(): array
|
||||
{
|
||||
return ['mail'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mail representation of the notification.
|
||||
*/
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$appTitle = get_settings('app_title') ?? 'VueFileManager';
|
||||
|
||||
$user = User::find($this->invitation->email);
|
||||
|
||||
if ($user) {
|
||||
return (new MailMessage)
|
||||
->subject("You are invited to collaboration with team folder in $appTitle")
|
||||
->greeting('Hello!')
|
||||
->line('You are invited to collaboration with team folder')
|
||||
->action('Join into Team Folder', url('/team-folder-invitation', ['id' => $this->invitation->id]))
|
||||
->salutation("Regards, $appTitle");
|
||||
}
|
||||
|
||||
return (new MailMessage)
|
||||
->subject("You are invited to collaboration with team folder in $appTitle")
|
||||
->greeting('Hello!')
|
||||
->line('You are invited to collaboration with team folder. But at first, you have to create an account to proceed into team folder.')
|
||||
->action('Join & Create an Account', url('/team-folder-invitation', ['id' => $this->invitation->id]))
|
||||
->salutation("Regards, $appTitle");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user