Difference between revisions of "Database"
Jump to navigation
Jump to search
Salwani.nur (talk | contribs) |
Salwani.nur (talk | contribs) |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | 1. | + | 1. Create a table |
| + | - In composer, type 'php artisan make:migration create_table' | ||
| + | - To make migration, type 'php artisan migrate' | ||
| − | - For example: | + | 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');"