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