Forms 将Laravel中的表格值传递给叶片模板

Forms 将Laravel中的表格值传递给叶片模板,forms,laravel,laravel-4,blade,Forms,Laravel,Laravel 4,Blade,我试图找到一种方法,将在Laravel表单中输入的值传递到操作页面,但找不到正确的语法 以下是我的刀锋形态摘录: {{ Form::open(array('url' => 'thanks')) }} {{ Form::label('email', 'Email Address') }} {{ Form::text('email') }} {{ Form::submit('Sign Up') }} {{ Form::close() }} 这是我的路线: Route::post('th

我试图找到一种方法,将在Laravel表单中输入的值传递到操作页面,但找不到正确的语法

以下是我的刀锋形态摘录:

{{ Form::open(array('url' => 'thanks')) }}
 {{ Form::label('email', 'Email Address') }}
 {{ Form::text('email') }}
 {{ Form::submit('Sign Up') }}
{{ Form::close() }}
这是我的路线:

Route::post('thanks',function($email)
{
$theEmail = $email;       
return View::make('thanks', $theEmail);
});

如何更正路由,以便在我的
谢谢.blade.php
页面中使用
$theEmail

您需要通过
Input::get()从发布的表单中获取变量

然后在你的刀片文件中

{{ $theEmail }}
路由::post('Thank',function())

{


感谢您的快速响应!我在实施更改时遇到了以下错误:“[2014-05-28 16:13:07]production.error:exception'ErrorException',消息'array_merge():Argument#2不是/Users/jlowery/testapp/bootstrap/compiled.php:8909”Ideas?
Route::post('thanks',function()
{
   $data = [];
   $data['theEmail'] = Input::get('email');
   return View::make('thanks', $data);
});
{{ $theEmail }}
 $email=Input::get('email'); 


return View::make('thanks')->with('email',$email);


});