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 (
htmlspecialchars() expects parameter 1 to be string, object given (
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.
$brand->products()
when i changed my code and returning string, the error was gone.