dsyo9700 2015-02-22 07:42
浏览 68
已采纳

FatalErrorException:语法错误,意外':',期待','或';' 在Laravel

This thing is bugging me a lot. I'm getting this parse error: syntax error, unexpected ':', expecting ',' or ';' in /opt/lampp/htdocs/pratice/storage/framework/views/36f62563d0e17e05a5f15bec012dd0cd at line 21

My view file is

@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
  • 写回答

1条回答 默认 最新

  • doqau82086 2015-02-22 07:55
    关注

    Change {!! Form:open() !!} to

      {!! Form::open() !!}
    

    and {!! Form:close() !!} to

    {!! Form::close() !!}
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?