In this tutorial, we will show you the laravel artisan console command cheat sheet(list).
Artisan Console Laravel Command
Artisan console is the most useful part of the Laravel Framework. In laravel, an artisan console command-line is a tool to run Laravel commands. If you use these commands, it improves the development speed by providing ready to use scaffolding and required methods. You can save your lot of time using this.
Check Your Laravel Application Version
php artisan --version OR -V
Laravel Composer dump-autoload:
It just regenerates the list of all classes that need to be included in the project (autoload_classmap.php), and this is why your migration is working after you run that command.
php artisan dump-autoload
Laravel lists artisan commands:
php artisan list
Laravel Application Serve:
The Laravel artisan serve command is used to run the application using the PHP development server.
php artisan serve
Interact with the Laravel Application:
php artisan tinker
Publish a package’s assets to the public directory:
php artisan asset:publish [--bench[="vendor/package"]] [--path[="..."]] [package]
Generate Application Key in Laravel:
php artisan key:generate
Laravel Database migrations:
php artisan migrate
Create a new resourceful controller in Laravel:
php artisan controller:make [--bench="vendor/package"]
Generate database migration along with model in Laravel:
php artisan make:model User --migration OR -m
Generate database seeder in Laravel:
php artisan make:seeder [Table Seeder]
Create new middleware in Laravel:
Make:middleware [Middleware name]
Lists active routes in Laravel Application:
Create symbolic link in Laravel:
Create symbolic link from
Flush the Laravel Application cache:
php artisan cache:clear
In this post, you have learned uses of the laravel artisan commands.