Skip to content

Commit

Permalink
chore: use @php in Blade templates (#3172)
Browse files Browse the repository at this point in the history
* chore: remove comment

* chore: use `@php` in blade templates

* chore: use `@php` in blade templates
  • Loading branch information
davwheat authored Nov 23, 2021
1 parent bb817d9 commit 86d23a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion views/frontend/content/discussion.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div>
@foreach ($posts as $post)
<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>
<div class="Post-body">
{!! $post->attributes->contentHtml !!}
Expand Down
7 changes: 3 additions & 4 deletions views/layouts/basic.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{{-- TODO: Change below to @php when Laravel is upgraded --}}
<?php
@php
$primaryColor = $settings->get('theme_primary_color', '#000');
?>
@endphp

<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
Expand Down

0 comments on commit 86d23a5

Please sign in to comment.