PHP Artisan and some of its Command

PHP Artisan is the command line interface which was included in Laravel. It gives few commands that will users develop their application easier. Some of the most used commands are:

$ php artisan --version

This will help you view the current version of your Laravel. In order to see the list of Artisan commands, use:

$ php artisan list

To run laravel project on your browser,

$ php artisan serve

To setup the application key,

$ php artisan key:generate

To clear all the cache of the application,

$ php artisan cache:clear

To clear all the route cache,

$ php artisan route:clear

To create an auth function in your application,

$ php artisan make:auth

To migrate your table,

$ php artisan migrate

To insert a new seeder into your table in database,

$ php artisan db:seed

To drop all the tables from the database and execute the migrate command,

$ php artisan migrate:fresh

Leave a Comment

Your email address will not be published. Required fields are marked *