<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ConverterController extends Controller
{
    public function showForm()
    {
        return view('convert');
    }

    public function convert(Request $request)
    {
        $kg = $request->input('kg');
        $lbs = $kg * 2.20462;

        return view('convert', ['kg' => $kg, 'lbs' => $lbs]);
    }
}