@extends('layouts.app') @php $editing = $user->exists; $action = $editing ? route('admin.users.update', $user) : route('admin.users.store'); $value = fn (string $field, $fallback = null) => old($field, $user->{$field} ?? $fallback); @endphp @section('title', $editing ? 'Edit user' : 'Add user') @section('heading', $editing ? 'Edit user — '.$user->name : 'Add a user') @section('actions') Cancel @endsection @section('content')
@endsection