modify("-1 month"); $datetime_month_ago_text = $datetime_month_ago->format('Y-m-d H:i:s' . '\''); $context['user_count'] = UserModel::count(array( [ 'name' => 'obj.register_at', 'type' => '>=', 'value' => $datetime_month_ago_text ] )); $context['recipes_count'] = RecipeModel::count(array( [ 'name' => 'obj.created_at', 'type' => '>=', 'value' => $datetime_month_ago_text ] )); $context['ban_count'] = BanlistModel::count(array( [ 'name' => 'obj.created_at', 'type' => '>=', 'value' => $datetime_month_ago_text ] )); $context['latest_recipes'] = RecipeModel::filter( array(), ['-obj.created_at'] ); return $context; } }