@extends('index')

@section('subtitle')
    Kelola Berita > Edit Berita
@endsection

@section('content')
    <div class="form-tambah">
        <h4> Edit Berita </h4>
        <form method="POST" action="{{url('kelola/berita/'.$berita->id.'/update')}}" enctype="multipart/form-data">
            {{csrf_field()}}
            <div class="input-group">
                <input type="text" name="judul" value="{{$berita->judul}}" placeholder="Judul">
            </div>
            
            <div class="input-group">
                <textarea name="isi" placeholder="Tulis Article">{{$berita->isi}}</textarea>
            </div>
            
            <div class="input-group">
                <label for="cover" id="cover-label">
                    <span>
                        <img src="{{asset('img/upload.png')}}" alt="">
                    </span>
                    <p id="label-text">Pilih Cover Berita</p>
                </label>
                <input hidden name="cover" type="file" id="cover">
            </div>
        
            
            <div class="input-group">
                <input type="text" name="penulis" value="{{$berita->penulis}}" placeholder="Penulis">
            </div>
            
            <div class="input-group">
                <input type="submit" value="Update">
            </div>
        </form>    
    </div>
@endsection
