# fluent-cart/1.6.4/app/Models/Concerns/HasActivity.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 16 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Models/Concerns/HasActivity.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Models/Concerns/HasActivity.php
- Modified: 2025-10-14T16:36:46+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-cart/1.6.4/code/app/Models/Concerns/HasActivity.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Models\Concerns;

use FluentCart\App\Models\Activity;
use FluentCart\Framework\Database\Orm\Relations\MorphMany;

trait HasActivity
{
    public function activities(): MorphMany
    {
        return $this->morphMany(Activity::class, 'module')
            ->orderBy(sanitize_sql_orderby('created_at'), sanitize_sql_orderby('DESC'))
            ->orderBy(sanitize_sql_orderby('id'), sanitize_sql_orderby('DESC'));
    }
}
```
