Membuat 3 Tabel Database Menggunakan Laravel Migrations 1. Tabel Customers jalankan perintah berikut php artisan make : migration create_customers_table Buka file migration yang baru dibuat di database/migrations/. Tambahkan kode berikut di dalam metode up() : public function up () : void { Schema :: create ( 'customers' , function ( Blueprint $table ) { $table -> id (); // BIGINT UNSIGNED AUTO_INCREMENT PRIMARY $table -> string ( 'name' ); $table -> string ( 'email' ) -> unique (); $table -> text ( 'address' ) -> nullable (); $table -> timestamps (); // created_at & updated_at (nullable by default) }); } 2. Tabel Orders jalankan perint...
Menyelami Dunia Informatika
Selamat datang di 'Menyelami Dunia Informatika'. Bergabunglah ke dalam Dunia Informatika yang penuh dengan kreativitas, inovasi dan inspirasi