From: Louis Jeckel Date: Tue, 17 Nov 2020 14:56:30 +0000 (+0100) Subject: email template X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6ca438dafdbd8409660b4bf9b5d6fa2cd5e98a48;p=psq.git email template --- diff --git a/app/EmailTemplate.php b/app/EmailTemplate.php index 42a1a1b..2a3b5f8 100644 --- a/app/EmailTemplate.php +++ b/app/EmailTemplate.php @@ -44,19 +44,31 @@ class EmailTemplate extends Model * @param $user * @param $content * @return string + * @todo remove first regex */ public static function fillWithContentFor($user, $content) { - $content = preg_replace('/templateAttribute($match, null) ?? $matches[0]; }, $content); + } /** @@ -86,10 +98,9 @@ class EmailTemplate extends Model */ public static function button($url, $label, $color = null) { - return view('vendor.mail.html.button', [ + return view('unlayer.button', [ 'url' => $url, 'slot' => $label, - 'color' => $color ])->render(); } diff --git a/resources/views/unlayer/button.blade.php b/resources/views/unlayer/button.blade.php new file mode 100644 index 0000000..e25d3f6 --- /dev/null +++ b/resources/views/unlayer/button.blade.php @@ -0,0 +1,17 @@ + + + + + + +