1
私のフォームに問題があります。提出すると、エラーが発生します。何かが間違っているように見えます。ルートとHTMLフォームの動作でLaravelの問題
Route::get('/', function()
{
return View::make('index');
});
Route::post('/', array('as' => 'login', 'uses' => '[email protected]'));
そして、私のフォームは、次のようになります:私はLaravel 4.2を使用してい
は、私のルートは次のようになり
<form action="{{ action('[email protected]') }}" method="post">
<input class="signUpField-index" id="signUpEmail-index" type="text" placeholder="Email Address (required, but never shown) *" name="email" />
<input class="signUpField-index" id="signUpPassword-index" type="password" placeholder="Password *" name="password" />
<input id="signUpSubmit-index" type="submit" value="Sign Up" />
<input name="_token" type="hidden" value="{{ csrf_token() }}"/>
</form>
をそして、私のコントローラは次のようになります。
<?php
class HomeController extends BaseController {
public function showIndex()
{
return View::make('index');
}
public function login() {
//return var_dump(_POST);
return View::make('index');
}
}
私はそれが間違っている行動かもしれないと思うが、私はあまり確信していない、私は他の例とtutoを見てみましたここのようなrials:Adding form action in html in laravelが、彼らは助けていない。
ありがとうございます。