Htmlspecialchars() expects parameter 1 to be string array given
I go this error:
I'm using in controller:
And i send it to the view as array: 'data' => $newData And when i try to use $data into the view, it give me that error Tried already to use $data->ac OR $data['ac'] but still the same... Some help, please? asked Apr 4, 2017 at 21:18
4 When you use a blade echo
answered Apr 4, 2017 at 21:35
jfadichjfadich 5,8802 gold badges19 silver badges30 bronze badges 2 if you real intention is to send the full array from the html to the controller, you can use the following code: from the blade.php:
in controller
answered Apr 19, 2018 at 18:16
You could use
But best way in this case use the
brass monkey 4,92310 gold badges33 silver badges52 bronze badges answered Aug 13, 2018 at 14:56
Ehab ElzenyEhab Elzeny 2044 silver badges6 bronze badges 0 This is the proper way to access data in laravel :
answered Apr 2, 2019 at 6:17
Try use in your collection the https://www.php.net/manual/pt_BR/function.json-encode.php
Sven Eberth 2,97312 gold badges22 silver badges27 bronze badges answered Jun 25, 2021 at 17:22
|