--wip-- [skip ci]
This commit is contained in:
parent
bf24da2f40
commit
7dba56a7cc
|
@ -105,4 +105,18 @@ abstract class Letter extends Document
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return view-string
|
||||||
|
*/
|
||||||
|
public function mailView(): string
|
||||||
|
{
|
||||||
|
$view = 'mail.payment.'.Str::snake(class_basename($this));
|
||||||
|
|
||||||
|
if (!view()->exists($view)) {
|
||||||
|
throw new Exception('Mail view '.$view.' existiert nicht.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ use App\Letter\Letter;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Illuminate\Support\Str;
|
|
||||||
|
|
||||||
class PaymentMail extends Mailable
|
class PaymentMail extends Mailable
|
||||||
{
|
{
|
||||||
|
@ -36,9 +35,7 @@ class PaymentMail extends Mailable
|
||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
$template = Str::snake(class_basename($this->letter));
|
return $this->markdown($this->letter->mailView())
|
||||||
|
|
||||||
return $this->markdown('mail.payment.'.$template)
|
|
||||||
->attach($this->filename)
|
->attach($this->filename)
|
||||||
->replyTo('kasse@stamm-silva.de')
|
->replyTo('kasse@stamm-silva.de')
|
||||||
->subject($this->letter->getSubject().' | DPSG Stamm Silva');
|
->subject($this->letter->getSubject().' | DPSG Stamm Silva');
|
||||||
|
|
|
@ -10,7 +10,7 @@ parameters:
|
||||||
- packages/tex/src
|
- packages/tex/src
|
||||||
|
|
||||||
# The level 8 is the highest level
|
# The level 8 is the highest level
|
||||||
level: 6
|
level: 7
|
||||||
|
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in New Issue