# fluent-community/2.10.01/app/Models/Model.php

FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS &amp; Online Courses, version 2.10.01. 37 lines.

- Page: https://pluginprobe.com/plugins/fluent-community/2.10.01/code/app/Models/Model.php
- Raw: https://pluginprobe.com/plugins/fluent-community/2.10.01/raw/app/Models/Model.php
- Modified: 2026-07-24T13:35:06+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-community/2.10.01/code/app/Models/Model.php#L10-L20`.

```php
<?php

namespace FluentCommunity\App\Models;

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

/**
 * @method static static create(array $attributes = [])
 * @method static static|null find(mixed $id, array $columns = ['*'])
 * @method static static findOrFail(mixed $id, array $columns = ['*'])
 * @method static static|null first(array $columns = ['*'])
 * @method static static firstOrFail(array $columns = ['*'])
 */
class Model extends BaseModel
{
    protected $guarded = ['id', 'ID'];

    public function getPerPage()
    {
        if(isset($_REQUEST['per_page'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
            $this->perPage = (int) $_REQUEST['per_page']; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
        }
        return $this->perPage;
    }

    /**
     * Prepare a date for array / JSON serialization.
     *
     * @param  \DateTimeInterface  $date
     * @return string
     */
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format($this->getDateFormat());
    }
}

```
