feat: Add SEMSTORM domain input and SEO panel links

- Added optional SEMSTORM domain input field in site creation and editing forms.
- Introduced SEO panel links in site dashboard and edit pages.
- Created a new cron job for SEMSTORM data synchronization.
- Implemented database migrations for cron logs and site SEO metrics.
- Developed SiteSeoSyncService to handle SEMSTORM data fetching and storage.
- Added logging functionality for cron events.
- Created a new LogController to display cron logs with filtering options.
- Added SEO statistics dashboard with visual representation of metrics.
- Implemented site SEO metrics model for data retrieval and manipulation.
This commit is contained in:
2026-02-20 23:49:40 +01:00
parent 3d3432866c
commit e9a3602576
29 changed files with 1611 additions and 56 deletions

View File

@@ -30,4 +30,23 @@ class Site extends Model
{
self::update($id, ['last_published_at' => date('Y-m-d H:i:s')]);
}
public static function findNextDueForSeoSync(string $metricMonth): ?array
{
$sql = "SELECT s.*
FROM sites s
LEFT JOIN site_seo_metrics m
ON m.site_id = s.id
AND m.metric_month = :metric_month
WHERE s.is_active = 1
AND m.id IS NULL
ORDER BY s.id ASC
LIMIT 1";
$stmt = self::db()->prepare($sql);
$stmt->execute(['metric_month' => $metricMonth]);
$row = $stmt->fetch();
return $row ?: null;
}
}