mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 01:33:16 +00:00
Add admin message scaffolding
This commit is contained in:
parent
9a0c5bc8ae
commit
b944dc3a5f
2 changed files with 57 additions and 0 deletions
37
app/Mail/AdminMessage.php
Normal file
37
app/Mail/AdminMessage.php
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class AdminMessage extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
protected $msg;
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct($msg)
|
||||||
|
{
|
||||||
|
$this->msg = $msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
$admins = config('pixelfed.domain.app') . ' admins';
|
||||||
|
return $this->markdown('emails.notification.admin_message')
|
||||||
|
->with(['msg' => $this->msg])
|
||||||
|
->subject('Message from ' . $admins);
|
||||||
|
}
|
||||||
|
}
|
20
resources/views/emails/notification/admin_message.blade.php
Normal file
20
resources/views/emails/notification/admin_message.blade.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
@component('mail::message')
|
||||||
|
# Message from {{ config('pixelfed.domain.app') }}:
|
||||||
|
|
||||||
|
|
||||||
|
@component('mail::panel')
|
||||||
|
{{$msg}}
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Regards,<br>
|
||||||
|
{{ config('pixelfed.domain.app') }}
|
||||||
|
|
||||||
|
@component('mail::subcopy')
|
||||||
|
Please do not reply to this email, this address is not monitored.
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
@endcomponent
|
||||||
|
|
Loading…
Reference in a new issue