chore: use @php in Blade templates (#3172)

* chore: remove comment

* chore: use `@php` in blade templates

* chore: use `@php` in blade templates
This commit is contained in:
David Wheatley 2021-11-23 12:55:36 +00:00 committed by GitHub
parent bb817d9a90
commit 86d23a5de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -4,7 +4,7 @@
<div> <div>
@foreach ($posts as $post) @foreach ($posts as $post)
<div> <div>
<?php $user = ! empty($post->relationships->user->data) ? $getResource($post->relationships->user->data) : null; ?> @php $user = ! empty($post->relationships->user->data) ? $getResource($post->relationships->user->data) : null; @endphp
<h3>{{ $user ? $user->attributes->displayName : $translator->trans('core.lib.username.deleted_text') }}</h3> <h3>{{ $user ? $user->attributes->displayName : $translator->trans('core.lib.username.deleted_text') }}</h3>
<div class="Post-body"> <div class="Post-body">
{!! $post->attributes->contentHtml !!} {!! $post->attributes->contentHtml !!}

View File

@ -1,9 +1,8 @@
{{-- TODO: Change below to @php when Laravel is upgraded --}} @php
<?php
$primaryColor = $settings->get('theme_primary_color', '#000'); $primaryColor = $settings->get('theme_primary_color', '#000');
?> @endphp
<!doctype html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">