Undefined variable: errors — Laravel 5.2

后端 未结 6 1275
不知归路
不知归路 2021-02-05 18:28

I am new in Laravel and using laravel version 5.2.

I created a controller and request named as ArticlesController and CreateArticleRequest

6条回答
  •  死守一世寂寞
    2021-02-05 18:39

    With this code, you can catch errors and display them :

    @if ($errors->any())
     
    @foreach ( $errors->all() as $error )

    {{ $error }}

    @endforeach
    @endif

提交回复
热议问题