0
点赞
收藏
分享

微信扫一扫

laraval登录注册

小龟老师 2022-05-02 阅读 56
laravel

web.php

Route::any('create',[UserController::class,'create']);
Route::any('update',[UserController::class,'update']);
Route::any('store',[UserController::class,'store']);
Route::any('show',[UserController::class,'show']);
 Route::get('/login',function(){
      return view('/login');
  });
  Route::get('/register',function(){
       return view('/register');
   });

login.blade.php

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
	.body{
		{
			background-color:bisque;
		}

	}
  	body{
            background-image: url('img/1.jpg');
            background-repeat:no-repeat;
            background-size:100%;
        }
    * {
      margin: 0;
      padding: 0;
    }

    form {
		background-color: bisque;
      width: 500px;
      height: 400px;
      margin: 0 auto;
      border: 2px solid #ccc;
    }

    form div {
	position: relative;
	left: 40px;
      height: 80px;
      line-height: 40px;
      display: flex;
      justify-content: space-between;
      border:5px royalblue;
      align-items: center;
    }

    form div:last-child {
      justify-content: center;
    }

    form div input {
		position: relative;
		right: 200px;
      height: 30px;
      width:215px;
    }

    form div button {

            display: inline-block;
            padding: 15px 25px;
            font-size: 20px;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            outline: none;
            color: #5599FF;
            background-color: #FFDAB9;
            border: none;
            border-radius: 155px;


            opacity:1.0;
			}
.login-button:hover {
  background: #5599FF;
}
#a{
      width:50%;
      height:50px;
      margin-right:30px;

    }
    #b{
      width:50%;
      height:50px;
      margin-left:30px;
    }
    .wenzi{
    	color: #4169E1;
    }
    .wenzi2{
    	color: #4169E1;
    }
    button {display: inline-block}
  </style>

<body>
<!--  <script src="https://blog-static.cnblogs.com/files/jingtaoxin/%E7%88%B1%E5%BF%83%E7%82%B9%E5%87%BB%E7%89%B9%E6%95%88.js"></script>
        <script src="https://blog-static.cnblogs.com/files/jingtaoxin/%E8%8A%B1%E7%93%A3%E9%A3%98%E8%90%BD%E8%83%8C%E6%99%AF.js"></script>
        <script src="https://blog-static.cnblogs.com/files/jingtaoxin/%E9%BC%A0%E6%A0%87%E6%BB%91%E5%8A%A8%E5%90%8E%E7%BC%80.js"></script> -->
  <form name="div" action="users/create" method="get">
<div>

      <label class="wenzi">用户名:</label>
      <input id="id" name="username" type="text"  required placeholder="用户名" autocomplete="off">
    </div>
    <div>
      <label class="wenzi2">密码:</label>
      <input id="name" type="password" required name="email" placeholder="密码">
    </div>
	<div>
	  <label class="wenzi2">确认密码:</label>
	  <input id="password" type="password" required name="password" placeholder="确认密码">
	</div>

	<div>
	  <label class="wenzi2">验证码:</label>
	  <input id="password" type="password" required name="password" placeholder="验证码">
	</div>
    <div style="text-align:center" >
      <button type="submit" button="button" >注册</button>
       <button type="submit" button="button" action="register">登录</button>
    </div>

  </form>

</body>

</html>


在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

register.blade.php

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
	.body{
		{
			background-color:bisque;
		}

	}
  	body{
            background-image: url('img/1.jpg');
            background-repeat:no-repeat;
            background-size:100%;
        }
    * {
      margin: 0;
      padding: 0;
    }

    form {
		background-color: bisque;
      width: 500px;
      height: 400px;
      margin: 0 auto;
      border: 2px solid #ccc;
    }

    form div {
	position: relative;
	left: 40px;
      height: 80px;
      line-height: 40px;
      display: flex;
      justify-content: space-between;
      border:5px royalblue;
      align-items: center;
    }

    form div:last-child {
      justify-content: center;
    }

    form div input {
		position: relative;
		right: 200px;
      height: 30px;
      width:215px;
    }

    form div button {

            display: inline-block;
            padding: 15px 25px;
            font-size: 20px;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            outline: none;
            color: #5599FF;
            background-color: #FFDAB9;
            border: none;
            border-radius: 155px;


            opacity:1.0;
			}
.login-button:hover {
  background: #5599FF;
}
#a{
      width:50%;
      height:50px;
      margin-right:30px;

    }
    #b{
      width:50%;
      height:50px;
      margin-left:30px;
    }
    .wenzi{
    	color: #4169E1;
    }
    .wenzi2{
    	color: #4169E1;
    }
    button {display: inline-block}
  </style>

<body>
<!--  <script src="https://blog-static.cnblogs.com/files/jingtaoxin/%E7%88%B1%E5%BF%83%E7%82%B9%E5%87%BB%E7%89%B9%E6%95%88.js"></script>
        <script src="https://blog-static.cnblogs.com/files/jingtaoxin/%E8%8A%B1%E7%93%A3%E9%A3%98%E8%90%BD%E8%83%8C%E6%99%AF.js"></script>
        <script src="https://blog-static.cnblogs.com/files/jingtaoxin/%E9%BC%A0%E6%A0%87%E6%BB%91%E5%8A%A8%E5%90%8E%E7%BC%80.js"></script> -->
  <form name="div" action="users/show" method="get">
<div>

      <label class="wenzi">用户名:</label>
      <input id="id" name="username" type="text"  required placeholder="用户名" autocomplete="off">
    </div>
    <div>
      <label class="wenzi2">密码:</label>
      <input id="name" type="password" name="password"required  placeholder="密码">
    </div>

    <div style="text-align:center" >
       <button type="submit" button="button" action="">登录</button>
    </div>

  </form>

</body>

</html>


在这里插入图片描述
在这里插入图片描述

举报

相关推荐

登录和注册

Java 登录 注册

用户登录注册

集合(题目:登录注册)

登录注册窗口(一)

CSS注册登录案例

登录注册代码php

0 条评论