【发布时间】:2016-01-30 09:54:34
【问题描述】:
我是 laravel 的新手。我正在尝试在我的 form.blade.php 页面中创建一个基本表单。但是当我尝试导航到我的 form.blade.php 页面时,我收到以下错误:
5fca28a34b9eeee32d99bfd5ad77d6a463cb98c9.php 中的 FatalErrorException 第 23 行:语法错误,意外 'put' (T_STRING),期待 ')'
在我的 route.php 中,我调用 View::make() 方法来访问 form.blade.php 页面
Route::get('/',function(){
return View::make('form');
});
form.blade.php 页面::
<!DOCTYPE html>
<html>
<body>
{{Form::open(array('url'=>'thanks'))}}
{{Form::label('email','Email Address')}}
{{Form::text('email')}}
{{Form::label('os','operating system')}}
{{Form::select('os',array(
'linux'=>'Linux',
'mac'=>'Mac',
'windows'=>'windows'
))}}
{{Form::label('comment','Comment')}}
{{From::textarea('comment','',array('placeholder=>'put your comment here'))}}
{{Form::checkbox('agree','yes',false)}}
{{Form::label('agree','i agree with your terms and condition')}}
{{Form::submit('submit')}}
{{Form::close()}}
</body>
</html>
【问题讨论】: