0
无论出于何种原因,这是我的督察/网络窗口返回301永久移动错误。它不会将表单数据发布到表中。表单数据没有通过,回来301永久移动错误(使用laravel)
index.blade.php文件
{{ Form::open(array('url' => '/')) }}
{{ Form::text('firstname' , '', array('placeholder' => 'first name'))}}
{{ Form::text('lastname' , '', array('placeholder' => 'last name'))}}
{{ Form::submit('add name', array('class' => 'btn btn-success'))}}
{{ Form::close() }}
路由文件
<?php
Route::get('/', function(){
return View::make('index');
});
Route::post('/', function() {
$input = Input::all();
DB::insert('insert into Donkey (firstname, lastname) values (?, ?)', array($input['firstname'], $input['lastname']));
});
什么想法?
尝试增加回归到封闭 –