phan trang dong bo du lieu
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user