You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
498 B

<?php
namespace App\Models;
use CodeIgniter\Model;
final class ProductImage extends Model
{
protected $table = 'image_product';
protected $allowedFields = [
'product_id', 'images'
];
public function create($data)
{
return $this->insert($data);
}
public function getAll($id)
{
return $this->where('product_id', $id)->findAll();
}
public function deleteOne(int $id)
{
return $this->where('id', $id)->delete();
}
}