@extends('template')
@section('content')
<div class="card">
<div class="card-body">
<a href="{{ route('kampung.create') }}" class="btn btn-primary btn-rounded btn-sm mb-4"><i
class="mdi mdi-plus">Tambah Data</i></a>
<div class="table-responsive">
<table class="table table-hover table-bordered">
<thead class="text-center table-info">
<tr>
<th>#</th>
<th>Nama</th>
<th>Kecamatan</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
@php
$no = 1;
@endphp
@foreach ($kampung as $item)
<tr>
<td style="width: 10%" class="text-center">{{ $no++ }}</td>
<td>{{ $item->nama }}</td>
<td>{{ $item->kecamatan->nama }}</td>
<td style="width: 10%">
<a href="{{ route('kampung.edit', $item->id) }}"
class="btn btn-warning btn-sm btn-rounded"><i class="mdi mdi-lead-pencil"></i></a>
<form action="{{ route('kampung.destroy', $item->id) }}" method="post">
@csrf
@method('delete')
<button onclick="return confirm('Yakin ingin menghapus data?')"
class="btn btn-danger btn-sm btn-rounded">
<i class="mdi mdi-delete"></i>
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]