首先就是传送门!原文地址
前言:
以前用的是laravel框架 调试是少不了的dd,这么优雅好用 可以清晰的看到想要打印的对象,是真的很棒的很优雅,
最近使用tp5.1项目过程中最少不了的就是调试,查看数据的结构,但是,他没有dd啊,百度出答案
看来向我一样的人不少呢!
步骤:
-
切换到当前应用目录:执行以下命令
composer require symfony/var-dumper --dev
-
安装完毕如图
-
D:\wamp64\www\B_BJZS\Wan_Video>composer require symfony/var-dumper --dev Using version ^4.3 for symfony/var-dumper ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 3 installs, 0 updates, 0 removals - Installing symfony/polyfill-php72 (v1.12.0): Loading from cache - Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache - Installing symfony/var-dumper (v4.3.3): Loading from cache symfony/var-dumper suggests installing symfony/console (To use the ServerDumpCommand and/or the bin/var-dump-server script) Writing lock file Generating autoload files D:\wamp64\www\B_BJZS\Wan_Video>
然后打印dd($this);
-
Very Good !
-