Page 4 - Modul CRUD Laravel_Neat
P. 4
CREATE TABLE barang (
id int(6) AUTO_INCREMENT PRIMARY KEY,
nama_barang varchar(50) NOT NULL,
jumlah_barang INT(30) NOT NULL,
harga_barang INT(30) NOT NULL);
8. Isi table untuk testing
insert into barang values (1,'Pot',52,10000);
9. Buat user mysql baru
CREATE USER 'laravel'@'localhost' IDENTIFIED BY '123';
GRANT ALL PRIVILEGES ON *.* TO 'laravel'@'localhost';
FLUSH PRIVILEGES;
10. Edit .env pada laravel
Sesuaikan nama database, username, dan password