htmlspecialchars() expects parameter 1 to be string, array given Laravel 5.6

后端 未结 3 913
眼角桃花
眼角桃花 2021-01-17 01:35

Already done a research but I don\'t find the right answer that fit my problem.

error: htmlspecialchars() expects parameter 1 to be string, array given(create.blade)

3条回答
  •  醉酒成梦
    2021-01-17 01:59

    You are using Array inside {{}} somewhere. You can only use String inside {{}}.

    use {{dd(variable_name)}} to check the variable before you use it inside {{}}. if its an array convert it into String first ( using implode()) ).

    implode documentation: http://php.net/manual/en/function.implode.php

    blade documentation: https://laravel.com/docs/5.6/blade#displaying-data

提交回复
热议问题