How to build custom command to do task with less writting
php artisan make:command showDb
It will generate a file under App→Console→commands→showDb.php
give command name with desctiption
Register your commnad inside kernel.php to show in the terminal
we can write our own functionality inside the command as we are writing the command to show the current database
make sure to import DB class inside this file
use Illuminate\Support\Facades\DB;