OKEE
This commit is contained in:
parent
934e5599e9
commit
5eae918097
|
@ -22,7 +22,7 @@ public function up()
|
|||
$table->string('lokasi'); // Kolom lokasi
|
||||
$table->decimal('latitude', 10, 7); // Kolom latitude (10 digit, 7 desimal)
|
||||
$table->decimal('longitude', 10, 7); // Kolom longitude (10 digit, 7 desimal)
|
||||
$table->timestamps(); // Kolom created_at dan updated_at
|
||||
$table->timestamps(); // Kolom createbed_at dan updated_at
|
||||
});
|
||||
}
|
||||
|
|
@ -16,25 +16,39 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($courses as $index => $course)
|
||||
<tr class="odd:bg-white even:bg-gray-50">
|
||||
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap">
|
||||
{{ $index + 1 }}
|
||||
</th>
|
||||
<td class="px-6 py-4">
|
||||
{{ $course->nama_kursus }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ $course->deskripsi }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<img src="{{ asset('storage/' . $course->img) }}" class="w-72 h-auto object-cover" alt="">
|
||||
</td>
|
||||
<td class="px-6 py-4 flex space-x-2">
|
||||
<a href="#" class="font-medium text-white hover:underline py-2 px-4 bg-[#4F7F81] rounded-xl">Edit</a>
|
||||
<a href="#" class="font-medium text-white hover:underline py-2 px-4 bg-[#4F7F81] rounded-xl">Hapus</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="odd:bg-white even:bg-gray-50">
|
||||
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap">
|
||||
{{ $index + 1 }}
|
||||
</th>
|
||||
<td class="px-6 py-4">
|
||||
{{ $course->nama_kursus }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
{{ $course->deskripsi }}
|
||||
</td>
|
||||
<td class="px-6 py-4">
|
||||
<img src="{{ asset('storage/' . $course->img) }}" class="w-72 h-auto object-cover"
|
||||
alt="">
|
||||
</td>
|
||||
<td class="px-6 py-4 flex space-x-2">
|
||||
<form action="#" method="POST"
|
||||
onsubmit="return confirm('Apakah Anda yakin ingin menghapus?');">
|
||||
@csrf
|
||||
@method('Edit')
|
||||
<button type="submit"
|
||||
class="font-medium text-white hover:underline py-2 px-4 bg-[#4F7F81] rounded-xl">Edit</button>
|
||||
</form>
|
||||
<form action="{{ route('delete', ['id' => $course->id]) }}" method="POST"
|
||||
onsubmit="return confirm('Apakah Anda yakin ingin menghapus?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit"
|
||||
class="font-medium text-white hover:underline py-2 px-4 bg-[#4F7F81] rounded-xl">Hapus</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue