Difference between revisions of "Database"

From Wiki | Valse Technologies
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
1. Grouping resources means you put some models under the same heading in the sidebar
+
1. Create a table
 +
  - In composer, type 'php artisan make:migration create_table'
 +
  - To make migration, type 'php artisan migrate'
  
   - For example: put 'public static $group = 'Admin';' if you wish to put the model is under '''Admin''' heading
+
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');"