@extends('layouts.header')

@section('content')
<main>
   <div class="container">
      <h2>Edit Announcement</h2>
      <form id="announcementForm" action="{{ route('announcement.update', $announcement->id) }}" method="POST">
         @csrf
         @method('PUT')
         <div class="form-group">
            <label for="title">Title:</label>
            <input type="text" class="form-control" id="title" name="title" value="{{ $announcement->title }}" required>
         </div>
         <div class="form-group">
            <label for="announcement">Announcement:</label>
            <textarea class="form-control" id="announcement" name="announcement" rows="6" required>{{ $announcement->announcement }}</textarea>
         </div>
         <button type="submit" class="btn btn-primary">Update</button>
      </form>
   </div>
</main>
@endsection
