43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
<!-- resources/views/mqtt_form.blade.php -->
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>MQTT Publish Form</title>
|
|
<!-- Tambahkan Bootstrap CSS untuk styling (opsional) -->
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h2 class="mt-4">Publish Data to MQTT</h2>
|
|
<form action="/send-dat" method="POST">
|
|
@csrf
|
|
<div class="form-group">
|
|
<label for="id">ID:</label>
|
|
<input type="text" class="form-control" id="id" name="id" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="nama">Nama:</label>
|
|
<input type="text" class="form-control" id="nama" name="nama" required>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Publish</button>
|
|
</form>
|
|
@if (session('message'))
|
|
<div class="alert alert-success mt-3">
|
|
{{ session('message') }}
|
|
</div>
|
|
@endif
|
|
@if (session('error'))
|
|
<div class="alert alert-danger mt-3">
|
|
{{ session('error') }}
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|