การสร้าง table ใน database

ตัวอย่างการสร้าง table ชื่อ students โดยการเก็บ รหัสนักเรียน, ชื่อ, นามสกุล

รันคำสั่ง php artisan make:model Student -m ระบบจะแสดงชื่อไฟล์ migration

เปิดไฟล์ migration และเพิ่มข้อมูลตามนี้ไว้ระหว่าง $table->increment('id'); และ $table->timeStamps();

$table->string('student_id');

results matching ""

    No results matching ""