mirror of
https://github.com/pacnpal/thrillwiki_laravel.git
synced 2025-12-20 14:31:09 -05:00
18 lines
394 B
PHP
18 lines
394 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Park;
|
|
use App\Models\ParkArea;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
return view('home', [
|
|
'total_parks' => Park::count(),
|
|
'total_attractions' => ParkArea::count(),
|
|
'total_coasters' => ParkArea::where('type', 'roller_coaster')->count(),
|
|
]);
|
|
}
|
|
} |