@extends('layouts.app')
@section('content')
    <div class="container-fluid mt-5">
        <div class="card">
            <div class="card-header">{{ __('Event Listing') }}</div>
            <div class="card-body" style="overflow-x: auto;">
                <div class="">
                    <table class="table table-striped mb-0 ">
                    <thead class="thead-light">
                        <tr>
                            <th>{{ __("No") }}</th>
                            <th>{{ __("Event Name") }}</th>
                            <th>{{ __("Event Status") }}</th>
                            <th>{{ __("Start Date") }}</th>
                            <th>{{ __("End Date") }}</th>
                            <th>Action </th>
                           
                        </tr>
                    </thead>
                    <tbody>
                        @if($event)
                        @foreach($event as $event)
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ $event->event_name }}</td>
                             <td>@if($event->event_status == 1) Active @else Inactive @endif</td>
                            <td>{{ $event->start_date }}</td>
                            <td>{{ $event->end_date }}</td>
                            <td> <i class="fa fa-pencil-square"></i> <a href="/manage/{{$event->id}}">
                                    Edit
                                </a></td>
                            
                        </tr>
                        @endforeach
                        @else
                        <tr>
                            <td colspan="6">No data</td>
                        </tr>
                        @endif
                    </tbody>
                </table>
                </div>
            </div>
            <div class="card-footer">
                <a href="{{ route('home') }}" class="btn btn-primary">{{ __('Kembali') }}</a>
            </div>
        </div>
    </div>
@endsection
