I am trying to use Forms but keep getting this Error.
Class 'Form' not found
and
Class 'Form' not found (View: /path/to/laravel/resources/views/posts/create.blade.php)
my create.blade.php
@section('content')
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h1>Новая новость</h1>
<hr>
{!! Form::open(['route' => 'posts.store']) !!}
{!! Form::label('title',"Заголовок:") !!}
{!! Form::text('title', null, array('class' => 'form-control')) !!}
{!! Form::label('body', "Текст:") !!}
{!! Form::textarea('body',null, array('class' => 'form-control')) !!}
{!! Form::submit('Сохранить', array('class' => 'btn btn-success btn-lg btn-block', 'style' => 'margin-top:10px;')) !!}
{!! Form::close() !!}
</div>
</div>
@endsection
I add all needed lines and executed the commands according to the manual @ Laravel Collective
Providers:
Collective\Html\HtmlServiceProvider::class,
Alias:
'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class,
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2mt8lg7
via IFTTT
Aucun commentaire:
Enregistrer un commentaire