Laravel 9: New Database Commands You Must Know

New Database Commands You Must Know Laravel 9

Hello Laravel Friends,

In the Laravel v9.24 release, today’s blog will talk about the new DB commands.

Laravel Development Services

The Laravel update version 9.24 release introduces three new database commands: db:show, db:table, db:monitor commands. Using the db:You can get valuable insight into your database and its associated tables with Artisan commands show and db:table. The db:monitor Artisan command helps to monitor your database.

Let’s learn about New DB commands in Laravel 9.

Artisan “db:show” Command

The artisan db:show command is used to see an overview of your database. It gives a summary of the database, which includes database type, connection details, number of open connections, a summary of its tables, and more.

db show command

Hire laravel Developer

Artisan “db:table” Command

The artisan db:table command is used to see an overview of individual tables within your database. It gives an overview of the size, number of rows, columns, types, attributes, foreign keys, and indexes of the table. Moreover, db:table command also provides a breakdown of every column along with its attributes and data type.

db table command

Artisan “db:monitor” Command

The db:monitor command is the same as the queue:monitor command. It helps to see the number of open connections to your database. 

In addition, you may pass the –max option to the command, which will dispatch a DatabaseBusy event when the number of connections is greater than the –max count that was specified. If no –max option is provided, the DatabaseBusy event will not be dispatched.

Conclusion:

Hope you found this tutorial informative and that you learned the db:show, db:table, and db:monitor commands in the Laravel 9 release. To learn more about Laravel, stay tuned with us. If you need any help regarding Laravel development or customization, feel free to connect with our experienced Laravel Developers.

Contact Us

Happy Reading!

Previous Article

How to Translate Product Fields Labels in Magento 2

Next Article

Mobile Vs. Desktop Ecommerce And How To Improve Conversion Rates

View Comments (1)

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨