<x-app-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('Edit semester') }}
        </h2>
    </x-slot>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6">


    <div class="card max-w-xl mx-auto p-6">
        <h2 class="text-xl font-bold text-primary mb-4">Edit Semester</h2>
        <form action="{{ route('semesters.update', $semester) }}" method="POST">
            @csrf
            @method('PUT')
            <div class="mb-3">
                <label class="font-semibold">Semester</label>
                <input type="text" name="semester" class="form-control rounded" value="{{ old('semester', $semester->semester) }}" required>
                @error('semester')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="mb-3">
                <label class="font-semibold">Tahun Ajaran</label>
                <input type="text" name="tahun_ajaran" class="form-control rounded" value="{{ old('tahun_ajaran', $semester->tahun_ajaran) }}" required>
                @error('tahun_ajaran')<div class="text-red-600 text-sm mt-1">{{ $message }}</div>@enderror
            </div>
            <div class="flex gap-2 mt-4">
                <button type="submit" class="btn-primary">Update</button>
                <a href="{{ route('semesters.index') }}" class="btn-accent">Kembali</a>
            </div>
        </form>
    
            
</x-app-layout> 
