<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Testimonial_model — brand & talent testimonials.
 */
#[\AllowDynamicProperties]
class Testimonial_model extends MY_Model {

	protected $table = 'testimonials';
	protected $order_by = 'sort_order ASC, id ASC';

	/** All active testimonials. */
	public function active()
	{
		return $this->get_all(array('is_active' => 1));
	}

	/** Featured testimonials for the homepage carousel. */
	public function featured($limit = 8)
	{
		return $this->get_all(array('is_active' => 1, 'is_featured' => 1), $limit);
	}
}
