# fluent-support/2.4.5/app/Models/Model.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 2.4.5. 52 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/2.4.5/code/app/Models/Model.php
- Raw: https://pluginprobe.com/plugins/fluent-support/2.4.5/raw/app/Models/Model.php
- Modified: 2026-10-09T15:31:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-support/2.4.5/code/app/Models/Model.php#L10-L20`.

```php
<?php

namespace FluentSupport\App\Models;

use FluentSupport\Framework\Database\Orm\Model as BaseModel;

class Model extends BaseModel
{
    protected $guarded = ['id', 'ID'];

    public function __construct($attributes = [])
    {
        parent::__construct($attributes);
    }

    /**
     * Dates go out as stored: site time, "Y-m-d H:i:s", like every other date
     * column. The framework default is an ISO UTC moment, which made
     * created_at/updated_at the only dates in another format.
     *
     * @param \DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(\DateTimeInterface $date)
    {
        if ($date instanceof \DateTime || $date instanceof \DateTimeImmutable) {
            $date = (clone $date)->setTimezone(wp_timezone());
        }

        return $date->format('Y-m-d H:i:s');
    }

    public function getPerPage()
    {
        if (!isset($_REQUEST['per_page'])) {
            return 15;
        }

        if (isset($_REQUEST['nonce'])) {
            $nonceAction = (defined('REST_REQUEST') && REST_REQUEST) ? 'wp_rest' : 'fluent-support';
            
            if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_REQUEST['nonce'])), $nonceAction)) {
                return 15;
            }
        } elseif (is_admin() || wp_doing_ajax() || (defined('REST_REQUEST') && REST_REQUEST)) {
            return intval(sanitize_text_field(wp_unslash($_REQUEST['per_page']))) ?? 15;
        }

        return intval(sanitize_text_field(wp_unslash($_REQUEST['per_page'])));
    }
}

```
