求帮忙,继承了视图报错说undefined
在几个视图里面我都用了下面的语句继承dashboard.blade.php
里面有个引用
其实视图继承的时候没有提示undefined sUnreadNums,
但是,其中有一个视图create.balde.php显示错误,
Undefined variable: sUnreadNums (View: /home/johann/work/vtm/dnf/dnf-dev/dnf/resources/views/backend/layouts/dashboard.blade.php) (View: /home/johann/work/vtm/dnf/dnf-dev/dnf/resources/views/backend/layouts/dashboard.blade.php)
其他视图没有相关错误。
@extends('backend.layouts.dashboard')
里面有个引用
<span class="label unread">{{ $sUnreadNums ? $sUnreadNums : "" }}</span>
其实视图继承的时候没有提示undefined sUnreadNums,
但是,其中有一个视图create.balde.php显示错误,
Undefined variable: sUnreadNums (View: /home/johann/work/vtm/dnf/dnf-dev/dnf/resources/views/backend/layouts/dashboard.blade.php) (View: /home/johann/work/vtm/dnf/dnf-dev/dnf/resources/views/backend/layouts/dashboard.blade.php)
其他视图没有相关错误。
1 个回复
JohnLui
赞同来自: