@extends('layouts.appmin')

@section('content')
<div class="container">
    <h3 class="mb-4">Tambah Gambar Carousel</h3>

    @if(session('success'))
        <div class="alert alert-success">{{ session('success') }}</div>
    @endif

    <form action="{{ route('carousel.store') }}" method="POST" enctype="multipart/form-data">
        @csrf
        <div class="mb-3">
            <label for="tajuk" class="form-label">Tajuk</label>
            <input type="text" name="tajuk" class="form-control" required>
        </div>

        <div class="mb-3">
            <label for="keterangan" class="form-label">Keterangan</label>
            <textarea name="keterangan" class="form-control" rows="2" maxlength="180"></textarea>
        </div>

        <div class="mb-3">
            <label for="fail" class="form-label">Pilih Gambar</label>
            <input type="file" name="fail" class="form-control" required accept="image/*">
        </div>

        <div class="mb-3">
            <label for="tarikh_mula" class="form-label">Tarikh Mula Siar</label>
            <input type="date" name="tarikh_mula" class="form-control" required>
        </div>

        <div class="mb-3">
            <label for="tarikh_tamat" class="form-label">Tarikh Tamat Siar</label>
            <input type="date" name="tarikh_tamat" class="form-control" required>
        </div>

        <div class="d-grid">
            <button type="submit" class="btn btn-primary">Muat Naik</button>
        </div>
    </form>
</div>
@endsection
