Laravelcollective html form errors do not work

Error: BadMethodCallException in line FormBuilder.php 1208: The hasErrors method does not exist.

So, I installed Laravelcollective as usual, and most aspects work.

My composer .json

"laravelcollective/html": "~5.0",

And in my providers config / app.php

 Collective\Html\HtmlServiceProvider::class,

And aliases

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,

However, I get the error message:

BadMethodCallException in line FormBuilder.php 1208: The hasErrors method does not exist.

Not too sure what is going on here. My errors in my html look like this.

{{ Form::hasErrors('name') }}
{{ Form::errors('name') }}

Do I need to install a separate package for them?

+5
source share
3 answers

, Laravel Collective hasErrors() errors(). .

+2

:

composer dump-autoload -o
       php artisan route: clear
       php artisan cache: clear


    {!! Form::open(['url' => 'AddDataProfileController']) !!}
      {!!Form::text('email', 'E-Mail Address')!!} 
    {!! Form::close() !!}


0
source

Source: https://habr.com/ru/post/1661901/


All Articles