@extends('admin.layouts.layout')
@section('content')
    <div class="row match-height">
        <div class="col-md-12 col-12">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title text-primary">Categoria de Vídeos</h4>
                    <p class="text-muted">Cadastro de Categoria de Vídeos no Sistema</p>
                    <a class="btn btn-outline-primary btn-block d-grid gap-2" type="button"
                        href="{{ route('videoscategoria.create') }}" role="button">Nova Categoria</a>
                </div>

                <div class="card">
                    <div class="card-body">
                        <!-- Table -->
                        <div class="table-responsive">
                            <table class="table table-sm table-hover">
                                <thead>
                                    <tr>
                                        <th scope="col">Código</th>
                                        <th scope="col">Categoria</th>
                                        <th scope="col">Ações</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach ($videoscategoria as $videoscategoria)
                                        <tr>
                                            <th scope="row">{{ $videoscategoria->id }}</th>
                                            <th scope="row">{{ $videoscategoria->video_categoria }}</th>
                                            <td>
                                                <a href="{{ route('videoscategoria.edit', $videoscategoria->id) }}"
                                                    class="btn btn-sm btn-outline-warning">Editar</a>

                                                <form class="d-inline" method="POST"
                                                    action="{{ route('videoscategoria.destroy', $videoscategoria->id) }}"
                                                    onSubmit="return confirm('Tem certeza que deseja excluir?')">
                                                    @method('DELETE')
                                                    @csrf
                                                    <button class="btn btn-sm btn-outline-danger">Exluir</button>
                                                </form>
                                            </td>
                                        </tr>
                                    @endforeach

                                </tbody>
                            </table>
                        </div>

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