by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

Laravel 5.7.x, the artisan command starts to support and integrate Symfony's dump-server.
Through the artisan command, start the dump-server, and we can display the dump data on the console.
php artisan dump-server
Or, transfer the dumped data into html format.
php artisan dump-server --format=html > dump.html

So let me use D-Laravel, give it a try.
First, simply use D-Laravel's bash (./create test10) to create a new Laravel Project,
Check whether the version is above Laravel 5.7.x by alias ( a --version ).
Here, a in the figure below is the alias of php artisan of Laravel.
If you don't know the a alias setting of D-Laravel, please refer to this.

OK, then start dump-server, enter a dump-server.


Because it is just a simple test, I directly modify the welcome.blade.php file, the content is as follows:
In the code below, I want to use the dump() function to print out $ test variable, to the console terminal.
 @php
    $test="TEST";
    #Measurement dump-server prints data
    dump($test);
    @endphp

    Test dump-server and
    dump(); function

Load the page and see if anything gets dumped.

In the browsing screen above, we can see that once the dump-server is started, the dumped data will not be displayed in the browser,
Instead, the TEST variable is dumped from terminal.

Cool!!

Tags: laravel

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


d-laravel, docker, docker-compose, laravel

D-Laravel released v0.9.1 version

In order to keep D-Laravel in an operational version and a stable version. Start tagging this version Pass those tests.. This version has passed the ubuntu real and macos real machine tests, and the Container can be successfully established and executed..

laravel storage

How do I sync files with Laravel's Storage's sftp driver

The installation and setting of SFTP is beyond the scope of this article. If you want to know more, I suggest you read another article https://www.ccc.tc/article/Laravel-SFTP-Driver-Configuration. In this article, I will use a very fast Sample. Demo How do I use the self-built artisan command to synchronize the remote data to the local end. Some people may ask why rsync is not used. This article is to introduce the use of Storage to synchronize files. 🤪Let’s look directly at the code, I set up an sftp disk called ccc in config/filesystems.php.