Welcome to EasyAdmin 3
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:
/var/www/crm_mailer/src/Controller/DashboardController.php
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 DashboardController 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');
}
// ...
}