@extends('index') @if (Session::get("username")) {{-- Redirect to the main page if the user is already logged in --}} <script> window.location.href = "main"; </script> @endif @section("body") <center><h1> IT INVENTORY SYSTEM </h1></center> <form method ="POST" action="login-submit"> <div class="fields"> <div class="field half"> Username: <input type='text' name='username' ><br> Password: <input type='password' name='password' ><br> <input type='submit' name='btnLogin' value='Login'> </div> </div> @csrf </form> @if($errors) @foreach($errors->all() as $e) <p style = 'color:red'> {{$e}}<p> @endforeach @endif @endsection