这件事让我烦恼不已。我收到了这个解析错误:syntax error, unexpected ':', expecting ',' or ';' in /opt/lampp/htdocs/pratice/storage/framework/views/36f62563d0e17e05a5f15bec012dd0cd at line 21
我的观看文件是
@extends('layouts.loginlayout')
@section('content')
@if (session('status'))
<div class="alert alert-success">
{!! session('status') !!}
</div>
@endif
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
</div>
@endif
//this is line 21
{!! Form:open() !!}
<div class="form-group">
{!! Form::label('email','Email:') !!}
{!! Form::text('email',null,['class'=>'form-control','id'=>'email']) !!}
</div>
{!! Form::submit('Login',['class'=>'btn pull-right default-button']) !!}
{!! Form:close() !!}
@endsection
答案 0 :(得分:9)
将{!! Form:open() !!}
更改为
{!! Form::open() !!}
和{!! Form:close() !!}
到
{!! Form::close() !!}