@extends('layouts.admin')
@section('content')
<div class="container">
    <div class="row">
        <div class="col-12">
            <div class="bg-primary p-3">
                <h4 class="m-0 text-white">Admin Portal</h4>
            </div>
            <div class="row">
                <div class="col-md-4">
                    <form action="{{ route('submit-login') }}" method="POST" class="mt-3">
                        @csrf
                        <div>
                        @if($errors->any())
                        <div class="alert alert-danger fade show" role="alert">
                            Invalid credentials!
                        </div>
                        @endif
                        @if(session('error'))
                        <div class="alert alert-danger fade show" role="alert">
                            {{session('error')}}
                        </div>
                        @endif
                        </div>
                        <div class="form-group">
                            <label>Username</label>
                            <input type="text" class="form-control" name="username" />
                        </div>
                        <div class="form-group">
                            <label>Password</label>
                            <input type="password" class="form-control" name="password" />
                        </div>
                        <button class="btn btn-primary mt-3">Login</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
