Schema::create('posts', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->mediumText('content');
$table->timestamps();
});
$table->id()
- creates bigint(20)
unsigned auto-increment field
$table->string('title')
- creates varchar(255)
utf8mb4_unicode_ci field
$table->mediumText('content')
- creates mediumtext
utf8mb4_unicode_ci field
$table->timestamps()
- creates created_at
and updated_at
timestamps