From 78bcf74375bbba957cdade47ba2f8761db242f3f Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Tue, 23 Nov 2021 12:55:36 +0000 Subject: [PATCH] chore: use `@php` in Blade templates (#3172) * chore: remove comment * chore: use `@php` in blade templates * chore: use `@php` in blade templates --- framework/core/views/frontend/content/discussion.blade.php | 2 +- framework/core/views/layouts/basic.blade.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/framework/core/views/frontend/content/discussion.blade.php b/framework/core/views/frontend/content/discussion.blade.php index e9e4ebe13..51a2c9c0c 100644 --- a/framework/core/views/frontend/content/discussion.blade.php +++ b/framework/core/views/frontend/content/discussion.blade.php @@ -4,7 +4,7 @@
@foreach ($posts as $post)
- relationships->user->data) ? $getResource($post->relationships->user->data) : null; ?> + @php $user = ! empty($post->relationships->user->data) ? $getResource($post->relationships->user->data) : null; @endphp

{{ $user ? $user->attributes->displayName : $translator->trans('core.lib.username.deleted_text') }}

{!! $post->attributes->contentHtml !!} diff --git a/framework/core/views/layouts/basic.blade.php b/framework/core/views/layouts/basic.blade.php index 8e7978ec0..0054dc377 100644 --- a/framework/core/views/layouts/basic.blade.php +++ b/framework/core/views/layouts/basic.blade.php @@ -1,9 +1,8 @@ -{{-- TODO: Change below to @php when Laravel is upgraded --}} -get('theme_primary_color', '#000'); -?> +@endphp - +