Saturday, September 21, 2024
Google search engine
HomeLanguagesLaravel Artisan Console Command Cheat Sheet

Laravel Artisan Console Command Cheat Sheet

Laravel artisan commands cheat sheet; In this tutorial, we will show you the laravel artisan console command cheat sheet(list).

Laravel Artisan Console Command Cheat Sheet

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:

Route:list

Create symbolic link from public/storage to storage/app/public

Storage:link

Flush the Laravel Application cache:

php artisan cache:clear

Conclusion

In this post, you have learned the uses of the laravel artisan commands.

Recommended:-Laravel Try Catch

RELATED ARTICLES

Most Popular

Recent Comments