1
到刀片观点我在Laravel渲染值Laravel
$total_mess = Chat::whereRaw('to_user = ? and view = ? ', [Auth::user()->username, 0])->count();
此查询我想这个值传递给我使用多个视图(索引页menu.blade.php
文件。该文件menu.blade.php
,细节页面.....)。
那么我该如何做到这一点。
请注意。
我使用AppServiceProvider.php和[这里](http://prntscr.com/abjzok)是我的代码。我遇到错误类'App \ Http \ Controllers \ Auth'找不到。我尝试修改路径,但仍然无法正常工作。任何关于此操作的建议 –