# Artisan Commands
## Contents
- [Application Configuration](#application-configuration)
- [Sessions](#sessions)
- [Migrations](#migrations)
- [Bundles](#bundles)
- [Tasks](#tasks)
- [Unit Tests](#unit-tests)
- [Routing](#routing)
- [Application Keys](#keys)
- [CLI Options](#cli-options)
## Application Configuration [(More Information)](/docs/install#basic-configuration)
Description | Command
------------- | -------------
Generate a secure application key. An application key will not be generated unless the field in **config/application.php** is empty. | `php artisan key:generate`
## Database Sessions [(More Information)](/docs/session/config#database)
Description | Command
------------- | -------------
Create a session table | `php artisan session:table`
## Migrations [(More Information)](/docs/database/migrations)
Description | Command
------------- | -------------
Create the Laravel migration table | `php artisan migrate:install`
Creating a migration | `php artisan migrate:make create_users_table`
Creating a migration for a bundle | `php artisan migrate:make bundle::tablename`
Running outstanding migrations | `php artisan migrate`
Running outstanding migrations in the application | `php artisan migrate application`
Running all outstanding migrations in a bundle | `php artisan migrate bundle`
Rolling back the last migration operation | `php artisan migrate:rollback`
Roll back all migrations that have ever run | `php artisan migrate:reset`
## Bundles [(More Information)](/docs/bundles)
Description | Command
------------- | -------------
Install a bundle | `php artisan bundle:install eloquent`
Upgrade a bundle | `php artisan bundle:upgrade eloquent`
Upgrade all bundles | `php artisan bundle:upgrade`
Publish a bundle assets | `php artisan bundle:publish bundle_name`
Publish all bundles assets | `php artisan bundle:publish`
> **Note:** After installing you need to [register the bundle](../bundles/#registering-bundles)
## Tasks [(More Information)](/docs/artisan/tasks)
Description | Command
------------- | -------------
Calling a task | `php artisan notify`
Calling a task and passing arguments | `php artisan notify taylor`
Calling a specific method on a task | `php artisan notify:urgent`
Running a task on a bundle | `php artisan admin::generate`
Running a specific method on a bundle | `php artisan admin::generate:list`
## Unit Tests [(More Information)](/docs/testing)
Description | Command
------------- | -------------
Running the application tests | `php artisan test`
Running the bundle tests | `php artisan test bundle-name`
## Routing [(More Information)](/docs/routing)
Description | Command
------------- | -------------
Calling a route | `php artisan route:call get api/user/1`
> **Note:** You can replace get with post, put, delete, etc.
## Application Keys
Description | Command
------------- | -------------
Generate an application key | `php artisan key:generate`
> **Note:** You can specify an alternate key length by adding an extra argument to the command.
## CLI Options
Description | Command
------------- | -------------
Setting the Laravel environment | `php artisan foo --env=local`
Setting the default database connection | `php artisan foo --database=sqlitename`