这东西让我很烦。我收到此解析错误: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
最佳答案
将{!! Form:open() !!}
更改为
{!! Form::open() !!}
和
{!! Form:close() !!}
到{!! Form::close() !!}
关于php - FatalErrorException : syntax error,意外的 ':',在Laravel中需要 ','或 ';',我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28655638/