Professional Documents
Culture Documents
20410100083
PWDL P3
Soal:
Menentukan berat badan ideal berdasarkan tinggi badan
Views
Formku.php
<!DOCTYPE html>
<html>
<head>
<title>LARAVEL</title>
</head>
<body>
<h1>IMT IDEAL </h1>
<P>Masukkan Tinggi Badan anda untuk menentukan Berat Badan Ideal anda</P>
<form method="POST" action="hitungimt">
<input type="hidden" name="_token" value="<?php echo csrf_token();?>">
<input type="text" name="tinggi">
<input type="submit" name="kirim" value="Jumlah">
</form>
</body>
</html>
Controllers
BlogController.php
<?php
namespace App\Http\Controllers;
//untuk isi form
use Illuminate\Http\Request;
//panggil model perhitungan
use App\Models\Perhitungan;
Models
Perhitungan.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Controller;
use App\Http\Controllers\BLogController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
OUTPUT: