<h1>Register</h1>

<form method="POST" action="{{ route('register')}}">
    @csrf
    <div class="mb-3">
        <label for="name" class="form-label">Name</label>
        <input name="name" type="text" class="form-control @error('name') is-invalid @enderror" id="name" aria-describedby="name" value="{{ old('name') }}">  
        @error('name')
            <span class="invalid-feebback" role="alert">{{ $message }}</span>        
        @enderror  
    </div>
    <div class="mb-3">
        <label for="email" class="form-label">Email address</label>
        <input name="email" type="email" class="form-control @error('email') is-invalid @enderror" id="email" aria-describedby="email" value="{{ old('email') }}">  
        @error('email')
            <span class="invalid-feebback" role="alert">{{ $message }}</span>        
        @enderror   
    </div>
    <div class="mb-3">
        <label for="role_id" class="form-label">Role</label>
        <input name="role_id" type="text" class="form-control @error('email') is-invalid @enderror" id="role_id" aria-describedby="role_id" value="{{ old('role_id') }}">  
        @error('role_id')
            <span class="invalid-feebback" role="alert">{{ $message }}</span>        
        @enderror   
    </div>
    <div class="mb-3">
        <label for="password" class="form-label">Password</label>
        <input name="password" type="password" class="form-control @error('password') is-invalid @enderror" id="password">
        @error('password')
            <span class="invalid-feebback" role="alert">{{ $message }}</span>        
        @enderror  
    </div>
    <div class="mb-3">
        <label for="password_confirmation" class="form-label">Password Confirm</label>
        <input name="password_confirmation" type="password" class="form-control" id="password_confirmation">
        @error('password_confirmation')
            <span class="invalid-feebback" role="alert">{{ $message }}</span>        
        @enderror
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
</form>