This commit is contained in:
HANIF FEBRIANSYAH 2024-08-27 23:08:25 +07:00
parent 934e5599e9
commit 5eae918097
2 changed files with 33 additions and 19 deletions

View File

@ -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
}); });
} }

View File

@ -27,14 +27,28 @@
{{ $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"
alt="">
</td> </td>
<td class="px-6 py-4 flex space-x-2"> <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> <form action="#" method="POST"
<a href="#" class="font-medium text-white hover:underline py-2 px-4 bg-[#4F7F81] rounded-xl">Hapus</a> 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> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>