mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Added About, Listings, Location pages
Added additional pages About, Listings, and Location as well as implementing the corresponding functionality for those pages to be able to pull the data they need from the DB. Also continued layout clean up and adjusted some gloabal font sizing settings
This commit is contained in:
@ -13,14 +13,38 @@ class FrontIndexController extends Controller
|
||||
{
|
||||
$locations = Location::where("active", true)->get();
|
||||
$count = count($locations);
|
||||
|
||||
$terms = "no|agenda";
|
||||
$terms = "no|agenda";
|
||||
$recent = Location::where("active", true)
|
||||
->limit(5)->orderByDesc('updated_at')->get();
|
||||
|
||||
//$result = DB::select("SELECT * FROM searchlocations('$terms')");
|
||||
|
||||
return view('front.index', [
|
||||
'count' => $count,
|
||||
'title' => "The Bad Space"
|
||||
'count' => $count,
|
||||
'recent' => $recent,
|
||||
'title' => "The Bad Space"
|
||||
]);
|
||||
}
|
||||
|
||||
public function about()
|
||||
{
|
||||
return view('front.about', [
|
||||
'title' => "ABOUT"
|
||||
]);
|
||||
}
|
||||
|
||||
public function location(string $uuid = "1")
|
||||
{
|
||||
$location = Location::where("uuid", $uuid)->first();
|
||||
$name = "NO LOCATION FOUND";
|
||||
if ($location) {
|
||||
$name = $location->name;
|
||||
}
|
||||
return view('front.location', [
|
||||
'title' => $name,
|
||||
'location' => $location,
|
||||
'images' => json_decode($location->images),
|
||||
'updated' => $location->updated_at->format('Y M d'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user