src/Controller/HostingController.php line 19
<?php
namespace App\Controller;
use App\Entity\HostingPackages;
use App\Entity\Interested;
use App\Entity\ProductTypes;
use App\Form\InterestedType;
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class HostingController extends AbstractController
{
#[Route('/web-hosting', name: 'app_linux')]
public function linux(ManagerRegistry $doctrine, Request $request): Response
{
$data = [
'pageTitle' => 'Powerful Web Hosting in Wales | Little Welsh Hosting Company',
'pageDescription' => '',
];
$hosting = $doctrine->getRepository(ProductTypes::class)->findOneBy([
'dreamscapeName' => 'Linux Hosting'
]);
$products = $doctrine->getRepository(HostingPackages::class)->findBy([
'type' => $hosting,
'isActive' => 1
],[
'position' => 'ASC'
]);
return $this->render('hosting/shared.html.twig', [
'data' => $data,
'products' => $products
]);
}
#[Route('/wordpress-hosting', name: 'app_wordpress_hosting')]
public function wordpress(ManagerRegistry $doctrine): Response
{
$data = [
'pageTitle' => 'Managed, Reliable WordPress Web Hosting in Wales | Little Welsh Hosting Company',
'pageDescription' => '',
];
$hosting = $doctrine->getRepository(ProductTypes::class)->findOneBy([
'dreamscapeName' => 'WordPress Hosting'
]);
$featured = $doctrine->getRepository(HostingPackages::class)->findOneBy([
'type' => $hosting,
'period' => 1,
'popular' => 1,
'isActive' => 1
],[
'position' => 'ASC'
]);
$products = $doctrine->getRepository(HostingPackages::class)->findBy([
'type' => $hosting,
'isActive' => 1
],[
'position' => 'ASC'
]);
return $this->render('hosting/wordpress.html.twig', [
'data' => $data,
'products' => $products,
'featured' => $featured
]);
}
#[Route('/business-hosting', name: 'app_business_hosting')]
public function business()
{
}
}