From 98c961b7d17ef8479701659089ca8afc1e28919e Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sat, 6 Mar 2021 09:31:59 -0800 Subject: [PATCH] Use @php instead of {{ when setting title --- resources/views/foods/edit.blade.php | 2 +- resources/views/goals/edit.blade.php | 2 +- resources/views/recipes/edit.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/foods/edit.blade.php b/resources/views/foods/edit.blade.php index 0062b67..2f39ddc 100644 --- a/resources/views/foods/edit.blade.php +++ b/resources/views/foods/edit.blade.php @@ -1,5 +1,5 @@ - {{ $title = ($food->exists ? "Edit {$food->name}" : 'Add Food') }} + @php($title = ($food->exists ? "Edit {$food->name}" : 'Add Food')) {{ $title }}

{{ $title }}

diff --git a/resources/views/goals/edit.blade.php b/resources/views/goals/edit.blade.php index 0415e6b..8ba1ab4 100644 --- a/resources/views/goals/edit.blade.php +++ b/resources/views/goals/edit.blade.php @@ -1,5 +1,5 @@ - {{ $title = ($goal->exists ? 'Edit' : 'Add') . ' Goal' }} + @php($title = ($goal->exists ? 'Edit' : 'Add') . ' Goal') {{ $title }}

{{ $title }}

diff --git a/resources/views/recipes/edit.blade.php b/resources/views/recipes/edit.blade.php index 45f00b1..d297da5 100644 --- a/resources/views/recipes/edit.blade.php +++ b/resources/views/recipes/edit.blade.php @@ -1,5 +1,5 @@ - {{ $title = ($recipe->exists ? "Edit {$recipe->name}" : 'Add Recipe') }} + @php($title = ($recipe->exists ? "Edit {$recipe->name}" : 'Add Recipe')) {{ $title }}

{{ $title }}