Laravel MessageBag errors array is empty in view but with content if I kill script

后端 未结 5 520
太阳男子
太阳男子 2020-12-21 13:32

I am trying to return errors back to my view, this is part of my controller TestcategoryController

    $rules =array(
        \'name\' => \'required\'
            


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-21 13:51

    You need to use it like this:

    {{ $errors->getBag('default')->first('name') }}
    

提交回复
热议问题