Create a migrate file
PHP Artisan make:migration create_comments_table
Edit table field
<?phpuse Illuminate\database\schema\blueprint;use Illuminate\database\migrations\migration;class Createcommenttable extends Migration {/** * Run the migrations. * * @return void */public function up () { schema::creat E (' comment ', function (Blueprint $table) { $table->engine = ' InnoDB '; $table->increments (' id '); $table->integer (' news_id '); $table->string (' author_name '); $table->string (' Author_url '); $table->string (' Author_key '); $table->string (' IP '); $table->string (' message '); $table->string (' Mail '); $table->integer (' create_time '); $table->integer (' parent_id ');} ); /** * Reverse the migrations. * * @return void */public function down () {//}}
Create a table
PHP Artisan Migrate
Quickly create a table using Laravel's artisan