<?php 
namespace App\Models;

use CodeIgniter\Model;

class Perusahaan_model extends Model
{
	protected $table = 'perusahaan';
	protected $useTimestamps = true;
	protected $allowedFields = ['nama', 'keterangan'];

	public function get_perusahaan($id = false)
	{
		if($id == false){
			return $this->findAll();
		}

		return $this->where(['id'=>$id])->first();
	}
}