Difference between revisions of "Database"

From Wiki | Valse Technologies
Jump to navigation Jump to search
 
Line 2: Line 2:
 
   - In composer, type 'php artisan make:migration create_table'
 
   - In composer, type 'php artisan make:migration create_table'
 
   - To make migration, type 'php artisan migrate'
 
   - To make migration, type 'php artisan migrate'
 +
 +
2. Creating a column
 +
  - In migration files, under Schema function, put datatype and the column name
 +
  - For example: "$table->string('email');"

Latest revision as of 07:33, 20 November 2019

1. Create a table

  - In composer, type 'php artisan make:migration create_table'
  - To make migration, type 'php artisan migrate'

2. Creating a column

  - In migration files, under Schema function, put datatype and the column name
  - For example: "$table->string('email');"