Laravel 5.3 - htmlspecialchars() expects parameter 1 to be string

前端 未结 3 1543
执笔经年
执笔经年 2020-12-06 11:38

I am new to laravel and I am enjoying it. While working on a social media project I got this error: htmlspecialchars() expects parameter 1 to be string, object given (

3条回答
  •  情深已故
    2020-12-06 12:12

    In my case, i used a function inside blade file like $brand->products() and it was returning array, thats why i was seeing the message.

    when i changed my code and returning string, the error was gone.

提交回复
热议问题