Deploy Next and Nuxt frontends alongside your Laravel apps, all from one unified platform.Learn more

Laravel: New "model:show" Command

Following on from the recently introduced fresh new look for Artisan, we took some time to identify new Artisan commands to further improve the Laravel experience. One of the newly introduced commands is "model:show". This command dumps out the model and table highlights for the given model.


As you may know, we recently introduced a fresh new look for Artisan. But, we're not quite done with our flurry of console improvements.

Let us introduce you to model:show. This command displays a thorough overview of any Eloquent model in your application, including its available attributes and relationships. It's the fastest way to get a high-level overview of your application's models in all of their glory.

image

As you can see, model:show combines the information from your database with information from the Eloquent model itself to show you the model's full story.

You can even output the same information in JSON, so that services can ingest and use this information: php artisan model:show User --json

At Laravel, we're committed to providing you with the most robust and developer-friendly PHP experience in the world. So, we hope you enjoy this new Artisan command!


Laravel is the most productive way to
 build, deploy, and monitor software.

By submitting this form, you agree to our terms. You can opt-out anytime.