<?php

namespace App\Models;

use CodeIgniter\Model;

class LinkModel extends Model
{
    protected $table      = 'links';
    protected $primaryKey = 'id';
    protected $returnType = 'array';

    protected $allowedFields = ['nama', 'url'];

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';

    public function getAll(): array
    {
        return $this->orderBy('id', 'ASC')->findAll();
    }
}
