问答详情
源自:2-2 Laravel-静态资源管理及模板布局

Undefined property:错误怎么办

Undefined property: Illuminate\View\Factory::$yieldContent (View: /home/wwwroot/default/resources/views/common/layouts.blade.php) (View: /home/wwwroot/default/resources/views/common/layouts.blade.php)

提问者:慕妹4952661 2018-01-24 12:27

个回答

  • 慕妹7422820
    2018-01-24 18:57:05
    已采纳

    在使用$error时需要用到中间件:

    \Illuminate\Session\Middleware\StartSession::class,

    \Illuminate\View\Middleware\ShareErrorsFromSession::class,