Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
79 views
in Technique[技术] by (71.8m points)

php - $var->toJson Does not show the complete message

I'm trying to show to the customer all the items duplicated while using a CSV files importer in Laravel.

This is my line of code:

$importador->articulos_no_encontrados = $articulos_no_encontrados->toJson();

And the view shows the duplicities in an array, but the message end in [...] meaning that indeed there are more items to show but the customer cannot see them:

Error in Json format

Can you help me to find a solution to show the full message with all the items instead of the [...]? Currently I'm using dd() everytime that happens but the customer should be able to see it too.

Thanks in advance.

question from:https://stackoverflow.com/questions/65836758/var-tojson-does-not-show-the-complete-message

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Output of text fields are limited to 50 characters by default. Set the limit property to a higher value, see more info on https://backpackforlaravel.com/docs/4.1/crud-columns#text

You might want to use this field component https://github.com/ziming/json-field-for-backpack to make the output more readable for your users


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...