birzha/plugins/offline/sitesearch/models/QueryLogExport.php

14 lines
384 B
PHP
Raw Normal View History

2021-06-22 09:22:11 +00:00
<?php namespace OFFLINE\SiteSearch\Models;
class QueryLogExport extends \Backend\Models\ExportModel
{
public function exportData($columns, $sessionKey = null)
{
$subscribers = QueryLog::all();
$subscribers->each(function ($subscriber) use ($columns) {
$subscriber->addVisible($columns);
});
return $subscribers->toArray();
}
}