mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 03:06:54 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Notifications;
 | 
						|
 | 
						|
use Illuminate\Bus\Queueable;
 | 
						|
use Illuminate\Notifications\Notification;
 | 
						|
use Illuminate\Contracts\Queue\ShouldQueue;
 | 
						|
use Illuminate\Notifications\Messages\MailMessage;
 | 
						|
 | 
						|
class RemovedFromServer extends Notification implements ShouldQueue
 | 
						|
{
 | 
						|
    use Queueable;
 | 
						|
 | 
						|
    public object $server;
 | 
						|
 | 
						|
    /**
 | 
						|
     * Create a new notification instance.
 | 
						|
     */
 | 
						|
    public function __construct(array $server)
 | 
						|
    {
 | 
						|
        $this->server = (object) $server;
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Get the notification's delivery channels.
 | 
						|
     */
 | 
						|
    public function via(): array
 | 
						|
    {
 | 
						|
        return ['mail'];
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Get the mail representation of the notification.
 | 
						|
     */
 | 
						|
    public function toMail(): MailMessage
 | 
						|
    {
 | 
						|
        return (new MailMessage())
 | 
						|
            ->error()
 | 
						|
            ->greeting('Hello ' . $this->server->user . '.')
 | 
						|
            ->line('You have been removed as a subuser for the following server.')
 | 
						|
            ->line('Server Name: ' . $this->server->name)
 | 
						|
            ->action('Visit Panel', route('index'));
 | 
						|
    }
 | 
						|
}
 |