<?php
namespace App\Controller\Admin;
use App\Entity\User;
use App\Entity\Offering;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class DashboardController extends AbstractDashboardController
{
/**
* @Route("/admin", name="admin")
*/
public function index(): Response
return parent::index();
}
public function configureDashboard(): Dashboard
return Dashboard::new()
->setTitle('Plant Exchange');
public function configureMenuItems(): iterable
yield MenuItem::linktoRoute('Back to the website', 'fas fa-arrow-left', 'homepage');
yield MenuItem::linktoDashboard('Dashboard', 'fa fa-home');
yield MenuItem::linkToCrud('User', 'fas fa-user', User::class);
yield MenuItem::linkToCrud('Offering', 'fas fa-seedling', Offering::class);