1 | @extends('layouts.app')
|
---|
2 |
|
---|
3 | @section('content')
|
---|
4 | <div class="container">
|
---|
5 | <div class="row justify-content-center">
|
---|
6 | <div class="events-wrapper">
|
---|
7 | <div class="d-flex justify-content-between mb-3">
|
---|
8 | <h3 class="d-flex align-items-center mr-3">My Events</h3>
|
---|
9 | <div class="d-flex btn-container">
|
---|
10 | <a href="/events/create">
|
---|
11 | <button type="submit" class="me-2 btn btn-primary">Create Event</button>
|
---|
12 | </a>
|
---|
13 | </div>
|
---|
14 | </div>
|
---|
15 | <table class="table table-hover">
|
---|
16 | <thead>
|
---|
17 | <tr>
|
---|
18 | <th scope="col">#</th>
|
---|
19 | <th scope="col">Event Name</th>
|
---|
20 | <th scope="col">Event Date</th>
|
---|
21 | <th scope="col">City, Country</th>
|
---|
22 | <th scope="col">Event Type</th>
|
---|
23 | <th scope="col">Options</th>
|
---|
24 | </tr>
|
---|
25 | </thead>
|
---|
26 | <tbody>
|
---|
27 | @foreach($events as $event)
|
---|
28 | <tr>
|
---|
29 | <td>{{ $loop->index+1 }}</td>
|
---|
30 | <td>{{ $event->title }}</td>
|
---|
31 | <td>{{ $event->event_date->isoFormat('DD-MMM-Y') }}</td>
|
---|
32 | <td>{{ $event->city }}, {{ $event->country }}</td>
|
---|
33 | <td><span class="badge bg-info text-dark">{{ $event->event_type->name }}</span></td>
|
---|
34 | <td>
|
---|
35 | <a href="/events/{{ $event->slug }}">
|
---|
36 | <button type="button" class="btn btn-primary">View Event</button>
|
---|
37 | </a>
|
---|
38 | <a href="/events/edit/{{ $event->slug }}">
|
---|
39 | <button type="button" class="btn btn-secondary">Edit Event</button>
|
---|
40 | </a>
|
---|
41 | </td>
|
---|
42 | </tr>
|
---|
43 | @endforeach
|
---|
44 | </tbody>
|
---|
45 | </table>
|
---|
46 |
|
---|
47 | <div class="d-flex justify-content-center">
|
---|
48 | {!! $events->links() !!}
|
---|
49 | </div>
|
---|
50 | </div>
|
---|
51 | </div>
|
---|
52 | </div>
|
---|
53 | @endsection
|
---|