What do you know about PHP artisan? Mention some artisan command.

PHP artisan is a command-line interface/tool provided with Laravel. It consists of several useful commands which can be helpful while building an application. There are few artisan commands given below:

PHP artisan list

A ‘list’ command is used to view a list of all available Artisan commands.

PHP artisan help

Every command also contains a ‘help’ screen, which is used to display and describe the command’s available arguments and options. To display a help screen, run ‘help’ command.

PHP artisan tinker

Laravel’s artisan tinker is a repl (Read-Eval-Print Loop). Using tinker, one can write actual PHP code through command-line. One can even update or delete table records in the database.

PHP artisan -version

By using this command, one can view the current version of Laravel installation.

PHP artisan make model model_name

This command creates a model ‘model_name.php’ under the ‘app’ directory.

PHP artisan make controller controller_name

This command is used to build a new controller file in app/Http/Controllers folder.