@php $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $host = $_SERVER['HTTP_HOST']; $requestUri = $_SERVER['REQUEST_URI']; $current_url = $protocol . '://' . $host . $requestUri; preg_match('/\/edit\/(\d+)$/', $current_url, $matches); $page_id = isset($matches[1]) ? $matches[1] : null; $results = DB::table('pages_forms')->where('page_id', $page_id)->get(); @endphp @foreach(['First Name', 'Middle Name', 'Last Name', 'Company Name', 'Designation', 'Mobile Number', 'Office Phone Number', 'Address Line 1', 'Address Line 2', 'City', 'State', 'Zipcode', 'Email', 'Handicap', 'T-Shirt Size','Coming to Event', 'Hand Preferance','Attending','Name Initials for T shirt','Submit'] as $index => $name) @php $result = $results->get($index); $sequence = $result->sequence ?? ''; $show_on_page_checked = $result->show_on_page ?? 0; $required_checked = $result->required ?? 0; $field_label = isset($result->field_label) && $result->field_label!='' ? $result->field_label : ''; @endphp @endforeach
Field Name Field Label Show on page Required Set Sequence
{{ $name }}