var_dump
and print_r
are displayed are not formatted when using Laravel 4. How do I format the data to be more readable?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Add Kint to your composer.json by running this on the command line:
And then try it:
You should see this:
Better, huh?
You can use the pre tag to format align your answear http://www.w3schools.com/tags/tag_pre.asp
Use kint
we use should s() instead of print_r()
use should d() instead of var_dump()
ex: sd($arr); like same print_r($arr); die();
Ref: http://raveren.github.io/kint/#configuration