Konfigurasi awal codeigniter

Friday, November 20th, 2020

Download codeigniter di https://codeigniter.com/
Extract extract file zip ke dalam htdocs, kemudian rename menjadi nama projectnya (contoh: akademik)

Buka config > autoload.php, cari dan ubah baris sesuai code berikut

$autoload['libraries'] = array('database');
$autoload['helper'] = array('form','url');



Buka config > database.php

'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'akademik'

Copy code berikut dan jalankan di phpmyadmin > SQL

CREATE TABLE `arus_kas` (
  `id` int(3) NOT NULL,
  `Nama` varchar(75) NOT NULL,
  `NIM` varchar(15) NOT NULL,
  `Angkatan` varchar(4) NOT NULL,
  `Jurusan` varchar(50) NOT NULL,
  `Pembayaran` int(15) NOT NULL,
  `Jenis` varchar(50) NOT NULL,
  `Waktu` datetime NOT NULL,
  `Metode` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `arus_kas`
--

INSERT INTO `arus_kas` (`id`, `Nama`, `NIM`, `Angkatan`, `Jurusan`, `Pembayaran`, `Jenis`, `Waktu`, `Metode`) VALUES
(2, 'abc def', '098123', '2017', 'Informatika', 3000000, 'Pembangunan', '2018-11-20 10:43:22', 'EBanking'),
(3, 'Eka Angga', '123123', '2019', 'Informatika', 4000000, 'SPP', '2020-11-20 11:18:59', 'cash'),
(4, 'Budi', '987097', '2017', 'Manajemen', 2000000, 'SPP', '2020-11-20 11:21:21', 'cash');

ALTER TABLE `arus_kas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `id` (`id`);

ALTER TABLE `arus_kas`
  MODIFY `id` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

Simak video lengkapnya di sini


Leave a Reply

Your email address will not be published. Required fields are marked *

post_id=446