feat: init project codebase
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Dashboard extends AdminController
|
||||
{
|
||||
protected $base_model = 'package_model';
|
||||
|
||||
function count_total_get()
|
||||
{
|
||||
$ret = [
|
||||
'count'=>[]
|
||||
];
|
||||
foreach (['sample','customer','sample_upgrade_order'] as $model) {
|
||||
$this->load->model($model.'_model');
|
||||
$ret['count'][$model] = (int)$this->{$model.'_model'}->total();
|
||||
}
|
||||
$ret['count']['order_total'] = 0;
|
||||
$this->success($ret);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user