<?php
namespace App\Models;

use CodeIgniter\Model;


class ProductImageModel extends Model
{
protected $table = 'tbproduct_images';
    protected $primaryKey = 'image_id';
    protected $allowedFields = ['product_id', 'image_name'];

public function getImagesByProduct($productId)
{
    return $this->where('product_id', $productId)->findAll();
}    
    
}
