app/Mail/User/UserLoggedIn.php

This commit is contained in:
Benjamin Beganović 2021-06-09 16:57:16 +02:00
parent dcc51ba6a6
commit 9c45111a4e
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Invoice Ninja (https://invoiceninja.com). * Invoice Ninja (https://invoiceninja.com).
* *
@ -44,16 +45,15 @@ class UserLoggedIn extends Mailable
*/ */
public function build() public function build()
{ {
return $this->from(config('mail.from.address'), config('mail.from.name')) return $this->from(config('mail.from.address'), config('mail.from.name'))
->subject(ctrans('texts.new_login_detected')) ->subject(ctrans('texts.new_login_detected'))
->view('email.admin.notification') ->view('email.admin.notification')
->with([ ->with([
'settings' => $this->company->settings, 'settings' => $this->company->settings,
'logo' => $this->company->present()->logo(), 'logo' => $this->company->present()->logo(),
'title' => ctrans('texts.new_login_detected'), 'title' => ctrans('texts.new_login_detected'),
'body' => ctrans('texts.new_login_description', ['email' =>$this->user->email, 'ip' => $this->ip, 'time' => now()]), 'body' => ctrans('texts.new_login_description', ['email' => $this->user->email, 'ip' => $this->ip, 'time' => now()]),
'whitelabel' => $this->company->account->isPaid(), 'whitelabel' => $this->company->account->isPaid(),
]); ]);
} }
} }

View File

@ -1,4 +1,4 @@
@component('email.template.admin-light', ['logo' => $logo, 'settings' => $settings]) @component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
<div class="center"> <div class="center">
<h2>{!! $title !!}</h2> <h2>{!! $title !!}</h2>
<p>{!! $body !!}</p> <p>{!! $body !!}</p>