phan trang dong bo du lieu

This commit is contained in:
2020-12-24 15:43:24 +07:00
parent b26814bb97
commit 22f3a3f650
3 changed files with 12 additions and 11 deletions

View File

@@ -115,8 +115,8 @@ class ApiController extends Controller {
}
}
public function actionGetAllFeatures() {
$listManagement = ListManagement::find()->all();
public function actionGetAllFeatures($offset = 0, $limit = 10) {
$listManagement = ListManagement::find()->limit($limit)->offset($offset)->all();
$allFeatures = [];
foreach ($listManagement as $key => $value) {
$features = json_decode($value->image, true);

View File

@@ -516,7 +516,7 @@ class ListManagementController extends Controller {
public function actionUpdateFeature() {
if (Yii::$app->request->isAjax) {
Yii::$app->response->format = "json";
file_get_contents("http://localhost:2305/update-feature");
file_get_contents("http://localhost:2305/update-feature?total=" . ListManagement::find()->count());
return ["status" => true];
}
}