<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>用户登录</title>
</head>
<body>
<div class="login">
<form action="{{url('loginCheck')}}" method="post">
<h2>用户登录</h2>
<div>
<label for="username">用户名:</label>
<input id="username" type="text" name="username" placeholder="请输入用户名" required>
</div>
<div>
<label for="password">密码:</label>
<input id="password" type="password" name="password" placeholder="请输入密码" required>
</div>
<div>
<input type="submit">
<input type="reset">
</div>
@csrf
</form>
</div>
<style>
body{
background-color: lightgoldenrodyellow;
}
body *{
box-sizing: border-box;
}
.login form{
display: flex;
flex-direction: column;
width: 300px;
background-color: lightblue;
margin: 50px auto;
padding:10px 40px;
box-shadow: 0px 3px 6px #888;
}
.login h2{
text-align: center;
color: red;
}
.login *{
margin-bottom: 10px;
}
form div:last-of-type{
}
form div:last-of-type input{
margin-left: 40px;
}
.login label{
display: inline-block;
width: 50px;
text-align: right;
}
</style>
@if(!empty($data['message']))
<script>alert("{{$data['message']}}")</script>
@endif
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>用户注册</title>
</head>
<body>
<div class="regist">
<form action="{{url('/login')}}" method="post" onsubmit="return false">
@method('put')
<h2>用户注册</h2>
<div>
<label for="username">用户名:</label>
<input id="username" type="text" name="username" placeholder="请输入用户名" required>
</div>
<div>
<label for="email">邮箱:</label>
<input id="email" type="email" name="email" placeholder="请输入电子邮箱" required>
</div>
<div>
<label for="password">密码:</label>
<input id="password" type="password" name="password" placeholder="请输入密码" required>
</div>
<div>
<label for="repwd">确认密码:</label>
<input id="repwd" type="password" name="repwd" placeholder="请再次输入密码" required>
</div>
<div>
<input type="submit">
<input type="reset">
</div>
@csrf
</form>
</div>
<style>
body{
background-color: lightgoldenrodyellow;
}
body *{
box-sizing: border-box;
}
.regist form{
display: flex;
flex-direction: column;
width: 400px;
background-color: lightblue;
margin: 50px auto;
padding:10px 40px;
box-shadow: 0px 3px 6px #888;
}
.regist h2{
text-align: center;
color: red;
}
.regist *{
margin-bottom: 10px;
}
form div:last-of-type{
margin-left: 80px;
}
form div:last-of-type input{
margin-left: 40px;
}
form label{
display: inline-block;
width: 80px;
text-align: right;
}
</style>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>用户注册</title>
</head>
<body>
<div class="regist">
<form action="{{url('/login')}}" method="post" onsubmit="return false">
@method('put')
<h2>用户注册</h2>
<div>
<label for="username">用户名:</label>
<input id="username" type="text" name="username" placeholder="请输入用户名" required>
</div>
<div>
<label for="email">邮箱:</label>
<input id="email" type="email" name="email" placeholder="请输入电子邮箱" required>
</div>
<div>
<label for="password">密码:</label>
<input id="password" type="password" name="password" placeholder="请输入密码" required>
</div>
<div>
<label for="repwd">确认密码:</label>
<input id="repwd" type="password" name="repwd" placeholder="请再次输入密码" required>
</div>
<div>
<input type="submit">
<input type="reset">
</div>
@csrf
</form>
</div>
<style>
body{
background-color: lightgoldenrodyellow;
}
body *{
box-sizing: border-box;
}
.regist form{
display: flex;
flex-direction: column;
width: 400px;
background-color: lightblue;
margin: 50px auto;
padding:10px 40px;
box-shadow: 0px 3px 6px #888;
}
.regist h2{
text-align: center;
color: red;
}
.regist *{
margin-bottom: 10px;
}
form div:last-of-type{
margin-left: 80px;
}
form div:last-of-type input{
margin-left: 40px;
}
form label{
display: inline-block;
width: 80px;
text-align: right;
}
</style>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/9a61dce9c3c34cd62afc91b043c887a7.png)
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/2287763adb381d4409ece9da7d864505.png)