<?php

namespace App\Models\Referensi;

use App\Models\BaseModel;

class PdkpromoModel extends BaseModel
{
    protected $table            = 'pdk_promo';
    protected $primaryKey       = 'id';
    protected $allowedFields    = ['nama_kegiatan', 'ket'];

    public function find_by_id($id)
    {
        $db = \Config\Database::connect();
        $builder = $db->table($this->table);

        //$builder->join('table2', 'table2.fk = pdk_unit.fk');
        $builder->where('id', $id);

        return $builder->get()->getRow();
    }
}