diff --git a/app/Http/Controllers/StatsController.php b/app/Http/Controllers/StatsController.php index f6110b0..e161de8 100644 --- a/app/Http/Controllers/StatsController.php +++ b/app/Http/Controllers/StatsController.php @@ -11,10 +11,17 @@ class StatsController extends Controller { public function home() { + /* $case = CaseBuilder::whenRaw("version ~ '-dev-'")->thenRaw("CONCAT(SPLIT_PART(version,'-',1),'-',SPLIT_PART(version,'-',2))") ->whenRaw("version ~ '-00000000$'")->thenRaw("CONCAT(SPLIT_PART(version,'-',1),'-GIT')") ->whenRaw("version ~ '^v[0-9]+\.[0-9]+\.[0-9]+'")->thenRaw("SPLIT_PART(version,'-',1)") ->elseRaw("'unknown'"); + */ + + $case = CaseBuilder::whenRaw("version ~ '-dev-'")->thenRaw("CONCAT(SPLIT_PART(SPLIT_PART(version,'-',1),'.',1),'.',SPLIT_PART(SPLIT_PART(version,'-',1),'.',2),'-',SPLIT_PART(version,'-',2))") + ->whenRaw("version ~ '-00000000$'")->thenRaw("CONCAT(SPLIT_PART(SPLIT_PART(version,'-',1),'.',1),'.',SPLIT_PART(SPLIT_PART(version,'-',1),'.',2),'-GIT')") + ->whenRaw("version ~ '^v[0-9]+\.[0-9]+'")->thenRaw("CONCAT(SPLIT_PART(SPLIT_PART(version,'-',1),'.',1),'.',SPLIT_PART(SPLIT_PART(version,'-',1),'.',2))") + ->elseRaw("'unknown'"); $stats = SiteVersion::select([ DB::raw('DATE(site_versions.created_at) AS created_at'), diff --git a/resources/views/stats.blade.php b/resources/views/stats.blade.php index b02833f..018ffaa 100644 --- a/resources/views/stats.blade.php +++ b/resources/views/stats.blade.php @@ -11,6 +11,12 @@
+