PHP code example of maika-kanaka / ci3-eloquent

1. Go to this page and download the library: Download maika-kanaka/ci3-eloquent library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maika-kanaka / ci3-eloquent example snippets


$data = $this->My_model_name->table()->get()->result();

$data = $this->My_model_name->find('INV-202010-0001');

$data = $this->My_model_name->find(['status => 'active', 'is_stok' => 'Y']);

$this->My_model_name->updateIncrement(
	['kode_produk' => 'INV-202004-0001'],
	'jumlah_stok'
);

$this->My_model_name->updateDecrement(
	['kode_produk' => 'INV-202004-0001'],
	'jumlah_stok'
);

$this->My_model_name->delete('INV-202004-0001');

$increment = $this->My_model_name->primaryKeyInc();