Initialer Laravel Commit für BetiX
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

This commit is contained in:
2026-04-04 18:01:50 +02:00
commit 0280278978
374 changed files with 65210 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class NewLoginDetected extends Notification implements ShouldQueue
{
use Queueable;
public string $ip;
public string $userAgent;
public string $loginAt;
public function __construct(string $ip, string $userAgent, string $loginAt)
{
$this->ip = $ip;
$this->userAgent = $userAgent;
$this->loginAt = $loginAt;
}
public function via(object $notifiable): array
{
return ['mail'];
}
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject('New Login Detected on Your Account')
->view('emails.new-login', [
'user' => $notifiable,
'ip' => $this->ip,
'userAgent' => $this->userAgent,
'loginAt' => $this->loginAt,
'appName' => config('app.name'),
'supportEmail' => config('mail.from.address'),
'manageLink' => url('/settings/security'),
]);
}
}