@extends('layouts.master') @section('content') @php /* * Index the saved rows by what they configure. The original read * $notification_types[0] and [1], which broke as soon as fewer than two * rows existed. "attendance" and "fess" are the historic keys; the hospital * build writes "appointment" and "payment" and both are accepted. */ $byName = []; foreach ($notification_types as $row) { $byName[$row->notification] = $row->type; } $appointmentType = $byName['appointment'] ?? $byName['attendance'] ?? ''; $paymentType = $byName['payment'] ?? $byName['fess'] ?? ''; @endphp @if (Session::get('success'))