__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace WP_Statistics\Models;
use WP_Statistics\Abstracts\BaseModel;
use WP_Statistics\Utils\Query;
class ExclusionsModel extends BaseModel
{
public function countExclusions($args = [])
{
$args = $this->parseArgs($args, [
'date' => '',
'reason' => ''
]);
$result = Query::select(['SUM(count) as count'])
->from('exclusions')
->where('reason', '=', $args['reason'])
->whereDate('date', $args['date'])
->orderBy('date')
->getVar();
return $result ?? 0;
}
public function getExclusions($args = [])
{
$args = $this->parseArgs($args, [
'date' => '',
'reason' => '',
'exclusion_id' => '',
'per_page' => '',
'page' => 1,
'order_by' => 'count',
'order' => 'DESC',
'group_by' => 'reason',
]);
$result = Query::select([
'reason',
'date',
'SUM(count) as count'
])
->from('exclusions')
->where('reason', '=', $args['reason'])
->where('id', '=', $args['exclusion_id'])
->whereDate('date', $args['date'])
->perPage($args['page'], $args['per_page'])
->groupBy($args['group_by'])
->orderBy($args['order_by'], $args['order'])
->getAll();
return $result;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AuthorsModel.php | File | 13.25 KB | 0644 |
|
| EventsModel.php | File | 10.28 KB | 0644 |
|
| ExclusionsModel.php | File | 1.49 KB | 0644 |
|
| HistoricalModel.php | File | 6.89 KB | 0644 |
|
| OnlineModel.php | File | 5.93 KB | 0644 |
|
| PostsModel.php | File | 17.7 KB | 0644 |
|
| SummaryModel.php | File | 1.91 KB | 0644 |
|
| TaxonomyModel.php | File | 7.28 KB | 0644 |
|
| ViewsModel.php | File | 14.56 KB | 0644 |
|
| VisitorsModel.php | File | 67.67 KB | 0644 |
|