@php /** @var \TCG\Voyager\Models\DataType $dataType */ /** @var \Illuminate\Database\Eloquent\Model $dataTypeContent */ $edit = !is_null($dataTypeContent->getKey()); $add = is_null($dataTypeContent->getKey()); // Convenience accessors (match your column names) $row = $dataTypeContent; // Pre-computed helpers you used before: $fundsPaidOptions = fundsPaid(); // returns [key => label] $selectedFundsPaid = $row->funds_paid ? explode(',', $row->funds_paid) : []; $showProductType = in_array('3', $selectedFundsPaid) || count($selectedFundsPaid) > 1; $showPartial = in_array('3', $selectedFundsPaid); @endphp @extends('voyager::master') @section('css') @stop @section('page_title', __('voyager::generic.'.($edit ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular')) @section('page_header')