@ -260,11 +260,13 @@ class DatabaseController extends BaseController
$total = $query->count();
$query->orderBy('id desc');
$sql = $query->createCommand()->rawSql;
$query = $query->offset($offset)->limit($limit);
$items = $query->all();
$data = [];
$data['total'] = $total;
$data['sql'] = $sql;
$data['rows'] = [];
foreach($items as $item) {
$row = $item->toArray();