这个错误是什么?
遇到的非数字值(View: C:\xampp\htdocs\project\students\resources\views\layouts\header\header.blade.php) (View: C:\xampp\htdocs\project\students\resources\views\layouts\header\header.blade.php) ))
在我的刀刃里
<span clas="username">{{ auth()->user()->firstnames + ' ' + auth()->user()->lastname }}</span>发布于 2018-01-13 14:31:42
您正在为字符串追加加法字符。当使用加号时,php需要数字输入。
您应该只使用字符串连接符号:点字符:
<span clas="username">{{ auth()->user()->firstnames . ' ' . auth()->user()->lastname }}</span>https://stackoverflow.com/questions/48240801
复制相似问题