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