{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {% extends '@EasyAdmin/page/content.html.twig' %} {% block content_title 'Welcome to EasyAdmin 3' %} {% block main %}

You have successfully installed EasyAdmin 3 in your application!

You are seeing this example page because you haven't configured the start page of your Dashboard. To do that, open the following file in your editor:

{{ dashboard_controller_filepath }}

Then, add the following method to it to customize the Dashboard start page:

use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use EasyCorp\Bundle\EasyAdminBundle\Router\AdminUrlGenerator;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
// ...

class {{ dashboard_controller_class }} extends AbstractDashboardController
{
    /**
     * @Route("/admin")
     */
    public function index(): Response
    {
        // redirect to some CRUD controller
        $routeBuilder = $this->get(AdminUrlGenerator::class);

        return $this->redirect($routeBuilder->setController(OneOfYourCrudController::class)->generateUrl());

        // you can also redirect to different pages depending on the current user
        if ('jane' === $this->getUser()->getUsername()) {
            return $this->redirect('...');
        }

        // you can also render some template to display a proper Dashboard
        // (tip: it's easier if your template extends from @EasyAdmin/page/content.html.twig)
        return $this->render('some/path/my-dashboard.html.twig');
    }

    // ...
}
    
{% endblock %}