1.

Explain PHP artisan in detail.

Answer»

PHP artisan is a command based (CLI) tool in laravel, It provides a good number of commands that can help us to build an application faster. Artisan commands are available by default for all important operation like database seeding, migration, CACHE CONFIGURATION to clearing cache, SETTING application NAMESPACE, event and key generation, queueing, running scheduled tasks, etc.

To check available artisan command list, we can use the command :

php artisan list

Some important Laravel artisan commands are:

  • Php artisan help
  • php artisan tinker
  • php artisan MAKE
  • php artisan –versian
  • php artisan migrate
  • php artisan make:model model_name
  • php artisan make:controller controller_name
  • php artisan make:auth
  • php artisan cache:clear
  • php artisan db:seed
  • php artisan app:name
  • php artisan event:generate

To create a new (custom) php artisan command:

  • php artisan make:command


Discussion

No Comment Found