@extends('layouts.app')
@section('content')
    <div class="container-fluid mt-5">
        <div class="card">
            <div class="card-header">{{ __('Edit Event') }}</div>
            <div class="card-body">
                <div class="row">
                 @if($event)
                        @foreach($event as $event)
                            <div class="col-lg-6 col-md-6 col-sm-6">
                                <div class="cards cards-stats">
                                    <div class="cards-header" data-background-color="orange">
                                        {!! QrCode::size(100)->generate(url('event/'.$event->slug)); !!}
                                    </div>
                                    <div class="cards-content">
                                        <p class="category">{{ $event->event_name }}</p>
                                        <h3 class="title">@if($event->event_status == 1) Active @else Inactive @endif</h3>
                                        <br><b>Start :</b> {{$event->start_date}}
                                        <br><b>End :</b> {{$event->end_date}}
                                    </div>
                                    <div class="cards-footer">
                                        <div class="stats">
                                            <i class="material-icons text-danger">donut_small</i>
                                            <a href="/attendance/{{$event->id}}">Start Taking attendance</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                             <div class="col-lg-6 col-md-6 col-sm-6">
                                <a href="/attendance/{{$event->id}}" class="btn btn-warning">Print Out Event Detail and QrCode</a>
                            </div>



                        @endforeach
                        @else
                            no event
                        @endif

                </div>
            </div>
            
        </div>
    </div>
@endsection
