From af0cad05e988cf7628aa8593a57c8891a11912ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 24 Feb 2020 22:13:19 +0100 Subject: [PATCH] Add support for images (#3366) --- resources/views/email/components/header.blade.php | 3 +++ resources/views/email/example.blade.php | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/views/email/components/header.blade.php b/resources/views/email/components/header.blade.php index ca34e5239213..ff5a6c4568d7 100644 --- a/resources/views/email/components/header.blade.php +++ b/resources/views/email/components/header.blade.php @@ -1,4 +1,7 @@
+ @isset($image) + @isset($image_alt) {{ $image_alt }} @endisset + @endisset

{{ $slot }}

@isset($p) diff --git a/resources/views/email/example.blade.php b/resources/views/email/example.blade.php index 0363791aa08b..b8c8e88ec08d 100644 --- a/resources/views/email/example.blade.php +++ b/resources/views/email/example.blade.php @@ -1,13 +1,15 @@ -@if() -@component('email.components.layout-dark') -@else +{{-- @if() + @component('email.components.layout-dark') + @endif +--}} + @component('email.components.layout') -@endif @slot('header') - @component('email.components.header', ['p' => 'Your upgrade has completed!']) + @component('email.components.header', ['p' => 'Your upgrade has completed!', 'image' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png']) Upgrade! @endcomponent + @endslot @slot('greeting')