<?php

namespace App\Models;

use CodeIgniter\Model;

class BaseModel extends Model
{
    protected $useTimestamps = false;
    protected $returnType    = 'array';

    protected function applySearch($builder, $keyword, array $fields)
    {
        if (!$keyword) return;

        $builder->groupStart();
        foreach ($fields as $field) {
            $builder->orLike($field, $keyword);
        }
        $builder->groupEnd();
    }
}