Part-DB.Part-DB-server/src/Controller/HomepageController.php

31 lines
721 B
PHP
Raw Normal View History

2019-02-23 22:41:13 +01:00
<?php
namespace App\Controller;
use App\Entity\Attachment;
use App\Entity\AttachmentType;
use App\Entity\Category;
use App\Entity\Part;
2019-02-23 22:41:13 +01:00
use App\Entity\StructuralDBElement;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class HomepageController extends AbstractController
{
/**
* @Route("/")
*/
function homepage()
{
$repo = $this->getDoctrine()->getRepository(Part::class);
2019-02-23 22:41:13 +01:00
/** @var StructuralDBElement $attachment */
$attachment = $repo->find(1);
dump($attachment);
2019-02-23 22:41:13 +01:00
$response = "";
return $this->render('base.html.twig');
}
}