<?php

namespace App\Models;

use CodeIgniter\Model;

class Produk extends Model
{
    protected $table = 'products'; // Nama tabel
    protected $primaryKey = 'id'; // Jika primary key tidak 'id', sesuaikan di sini


    public function getall()
    {

        return $sql = $this->select('id,name')
        ->get()
        ->getResult();

    }
}