<?php

namespace App\Modules\Home\Controllers;
use App\Modules\Rides\Services\RideService;
use Core\Controller\Controller;
use App\Modules\Testimonials\Services\TestimonialsService;
class HomeController extends Controller
{
    public function index()
    {
        $this->view('home');
    }
    public function popularRides()
    {
        $rides = (new RideService())->getPopularRides();

        $this->view('home/popular-rides', [
            'rides' => $rides
        ]);
    }
    public function testimonials()
    {
        $testimonials = (new TestimonialsService())->getActiveTestimonials();

        $this->view('home/testimonials', [
            'testimonials' => $testimonials
        ]);
    }
}
