Laravel

Laravel 9: New Database Commands You Must Know

Hello Laravel Friends,

Today’s blog will discuss new DB commands introduced in the Laravel v9.24 release.

The Laravel update version 9.24 release introduces three new database commands: db:show, db:table, and db:monitor commands. Using the db:show and db:table Artisan commands, you can get valuable insight into your database and its associated tables. 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.

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.

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 understood the db:show, db:table, and db:monitor commands introduced in the Laravel 9 release. To learn more about Laravel, stay in touch with us. For any help regarding Laravel development or customization, you can connect with our experienced Laravel Developers.

Happy Reading!

Click to rate this post!
[Total: 3 Average: 5]
Bharat Desai

Bharat Desai is a Co-Founder at MageComp. He is an Adobe Magento Certified Frontend Developer 🏅 with having 8+ Years of experience and has developed 150+ Magento 2 Products with MageComp. He has an unquenchable thirst to learn new things. On off days you can find him playing the game of Chess ♟️ or Cricket 🏏.

View Comments

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

2 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

4 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

4 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

5 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

6 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago