143fe3d488
- Implemented clean MVC architecture with Router, Controller, and Model base classes - Created database migrations for users, bands, bookings, reviews, and availability - Set up Tailwind CSS with yellow color scheme and modern design - Added Alpine.js for reactive JavaScript components - Configured Vite for asset building and hot module replacement - Created authentication and role-based middleware - Implemented helper functions and configuration system - Added comprehensive README with setup instructions - Configured Apache with proper rewrite rules and security headers - Set up Composer and npm package management with modern dependencies
27 lines
552 B
PHP
27 lines
552 B
PHP
<?php
|
|
|
|
namespace App\Controllers;
|
|
|
|
use App\Core\Controller;
|
|
use App\Models\Band;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function index(): void
|
|
{
|
|
$bandModel = new Band();
|
|
|
|
// Get top-rated bands
|
|
$featuredBands = $bandModel->query(
|
|
"SELECT * FROM bands
|
|
WHERE is_approved = 1 AND is_active = 1
|
|
ORDER BY average_rating DESC, total_reviews DESC
|
|
LIMIT 6"
|
|
);
|
|
|
|
$this->view('home', [
|
|
'featuredBands' => $featuredBands,
|
|
]);
|
|
}
|
|
}
|