gpt4 book ai didi

php - RouteCollection.php 第 251 行中的 MethodNotAllowedHttpException

转载 作者:太空宇宙 更新时间:2023-11-04 01:47:42 25 4
gpt4 key购买 nike

    <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Creative - Bootstrap 3 Responsive Admin Template">
<meta name="author" content="GeeksLabs">
<meta name="keyword" content="Creative, Dashboard, Admin, Template, Theme, Bootstrap, Responsive, Retina, Minimal">
<link rel="shortcut icon" href="img/favicon.png">

<title>welcome</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link href="css/elegant-icons-style.css" rel="stylesheet" />
<link href="css/font-awesome.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet" />


</head>

<body class="login-img3-body">

<div class="container">

<form class="login-form" action="{{ route('login') }}">
{{ csrf_field() }}

<div class="login-wrap">
<p class="login-img"><i class="icon_lock_alt"></i></p>
<div class="input-group">
<span class="input-group-addon"><i class="icon_profile"></i></span>
<input type="text" name="Username" class="form-control" placeholder="Username" autofocus>
</div>
<div class="input-group">
<span class="input-group-addon"><i class="icon_key_alt"></i></span>
<input type="password" name="password" class="form-control" placeholder="Password">
</div>
<label class="checkbox">
<input type="checkbox" value="remember-me"> Remember me
<span class="pull-right"> <a href="#"> Forgot Password?</a></span>
</label>
<button class="btn btn-primary btn-lg btn-block" type="submit">Login</button>
<button class="btn btn-info btn-lg btn-block" type="submit">Signup</button>
</div>
</form>
<div class="text-right">
<div class="credits">

<a href="https://facebook.com/D.prakash.pokhrel/"> Developer::prakash</a>
</div>
</div>
</div>


</body>
</html>

这是我的 blade 文件,但它不能正常工作我怎样才能让它工作??我认为这是 action="{{ route('login') }} 的问题,当我点击登录底部时它显示糟糕,好像出了点问题。RouteCollection.php 第 251 行中的 MethodNotAllowedHttpException: 我该如何解决这个问题??

最佳答案

你缺少method='post',希望你在routes.php中正确声明了路由

Route::post('/post-form', 'YourController@saveDataFunction'); 正确声明路由,如果方法是 GET 写成 Route::GET 否则这会工作正常。

MethodNotAllowedHttpException 显然意味着找不到路由,意味着它在集合中丢失或者您以不同的方式声明它。

关于php - RouteCollection.php 第 251 行中的 MethodNotAllowedHttpException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44135082/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com