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

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 2.3.0. 35 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/2.3.0/code/app/Models/Model.php
- Raw: https://pluginprobe.com/plugins/fluent-support/2.3.0/raw/app/Models/Model.php
- Modified: 2025-11-06T15:00: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.3.0/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);
    }

    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'])));
    }
}

```
