Laravel Framework terminal Commands

  Laravel, PHP

Maintenance Modes

To enable maintenance mode, simply execute the down Artisan command:

php artisan down

To disable maintenance mode, use the up command:

php artisan up

Create New Projects

composer create-project laravel/laravel {Project name} "5.1.*"

Laravel Project serve to specific port/IP (eg. localhost:8000)

php artisan serve --host=localhost --port=8000

Creating New Laravel Controler (app/Http/Controllers/{controller name})

php artisan make:controller {ControllerName}

Creating New Middleware

php artisan make:middleware <middleware-name>

Creating New Migration (Creating DB Table skeleton ({Project}/database/migrations/{filename})

php artisan migrate:make {Name_users_table}
Running All Migration Files (Executing DB table to create table in DB)
php artisan migrate
Rollback migrations
php artisan migrate:rollback
Rollback all migrations
php artisan migrate:reset
Rollback all migrations and run them all again
php artisan migrate:refresh

php artisan migrate:refresh --seed

 

 

LEAVE A COMMENT