1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

Added Bad Space Info to index

Added some preliminary Bad Spade stats to the index to set up a space
for additional information to be shared in the future. Starting with an
    accurate display of locations tracked, Current Sources count and
    last update date
This commit is contained in:
ro
2024-01-26 12:16:38 -06:00
parent 175ea25d7b
commit c13f144e20
5 changed files with 45 additions and 18 deletions

View File

@ -25,12 +25,14 @@ class FrontIndexController extends Controller
public function start()
{
$list = $this->getRecent();
$list = $this->getRecent();
$latest_date = $list[0]->updated_at->format('Y M d');
return view('front.index', [
'count' => count($list),
'sources' => count(Source::where("active", true)->get()),
'recent' => $list,
'title' => "The Bad Space"
'count' => count($list),
'sources' => count(Source::where("active", true)->get()),
'recent' => $list,
'latest_date' => $latest_date,
'title' => "The Bad Space"
]);
}
@ -50,16 +52,17 @@ class FrontIndexController extends Controller
}
//this gets recent updates to display under search results
$list = $this->getRecent();
$list = $this->getRecent();
$latest_date = $list[0]->updated_at->format('Y M d');
return view('front.index', [
'count' => count($list),
'sources' => count(Source::where("active", true)->get()),
'recent' => $list,
'results' => $results,
'recent' => $list,
'terms' => $terms,
'title' => "Search Results",
'count' => count($list),
'sources' => count(Source::where("active", true)->get()),
'recent' => $list,
'results' => $results,
'recent' => $list,
'terms' => $terms,
'latest_date' => $latest_date,
'title' => "Search Results",
]);
}