@php $post_type = $post_type == 'Casestudy' ? 'Case Study' : $post_type; if($post_type == 'Case Study') { $location = $case_study->location ?? null; $brief = $case_study->brief ?? null; $solution = $case_study->solution ?? null; $outcome = $case_study->outcome ?? null; $client_feedback = $case_study->client_feedback ?? null; }elseif($post_type == 'Project') { $location = $project->location ?? null; } @endphp