@extends('layouts.app') @section('title', $student ? 'Edit Student' : 'Admit Student') @php $isEdit = (bool) $student; $action = $isEdit ? route('students.update', $student) : route('students.store'); $method = $isEdit ? 'PUT' : 'POST'; $val = function (string $key, mixed $fallback = '') use ($student) { return old($key, $student?->{$key} ?? $fallback); }; @endphp @section('content')
{{ $isEdit ? 'Update details for '.$student->full_name : 'Student Details and Parent / Guardian Details' }}