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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user