Laravel | Artisan Commands to know in Laravel

A short Introduction to laravel

Laravel is one of the famous PHP frameworks. It is based on MVC architecture and comes with lots of useful features for easier web development. We have numbers of commands available which helps us to do minutes of tasks in just seconds.

Let’s start the discussion about artisan commands

Artisan commands help us in making the development quick and easy. With this command, we can do many tasks with fewer efforts like make models, controllers, and DB migration.

Some of the useful commands of Laravel artisan :

To view all available commands

  • (php artisan help)

To create a laravel project 

  • (composer create-project laravel/laravel –-prefer-dist)

To check the list of all available routes

  • php artisan route:list

To put laravel application in maintenance mode

  • php artisan down

To remove laravel application from maintenance mode

  • php artisan up

To create controller

  • php artisan make:controller amitthakur

To create model

  • php artisan make:model amitthakur

To generate migration of database tables

  • php artisan make:migration create_users_table

To start the Laravel project

  • (php artisan serve)

To enable caching mechanism

  • php artisan route:cache

To view the list of available supported commands

  • php artisan list

Final Words

I hope this article helps you know better about Laravel Artisan. If it is useful for you in any manner, then do share it on social media, stay connected with me for the new update & contact me for any inquiry. 

Posted in LaravelTags:

Write a comment