Skip to content

Instantly share code, notes, and snippets.

@sky4git
Last active March 22, 2016 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sky4git/58f5271d1b48fd590435 to your computer and use it in GitHub Desktop.
Save sky4git/58f5271d1b48fd590435 to your computer and use it in GitHub Desktop.
Artisan commands Laravel
## make controller ##
php artisan make:controller PhotoController
## make controller with resource ##
php artisan make:controller PhotoController --resource
## make migrations
php artisan make:migration create_users_table
## Run migration
php artisan migrate
## Create a service provider
php artisan make:provider RiakServiceProvider
## Make migration
php artisan make:migration create_users_table
## Migration to add extra field into exising table
php artisan make:migration add_votes_to_users_table --table=users
## Migration to create specific table with tablename provided
php artisan make:migration create_users_table --create=users
## Run migration
php artisan migrate
php artisan migrate --force - with force
php artisan migrate:rollback - rollback
php artisan migrate:reset - reset
php artisan migrate:refresh - recreate with refresh
php artisan migrate:refresh --seed - recreate with refresh - Not sure about --seed though
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment