container->get(AdminUrlGenerator::class); // return $this->redirect($adminUrlGenerator->setController(OneOfYourCrudController::class)->generateUrl()); // Option 2. You can make your dashboard redirect to different pages depending on the user // // if ('jane' === $this->getUser()->getUsername()) { // return $this->redirect('...'); // } // Option 3. You can render some custom template to display a proper dashboard with widgets, etc. // (tip: it's easier if your template extends from @EasyAdmin/page/content.html.twig) // return $this->render('admin/dashboard.html.twig'); } public function configureDashboard(): Dashboard { return Dashboard::new() // you can include HTML contents too (e.g. to link to an image) ->setTitle('پیشخوان') // by default EasyAdmin displays a black square as its default favicon; // use this method to display a custom favicon: the given path is passed // "as is" to the Twig asset() function: // ->setFaviconPath('favicon/favicon.ico') // the domain used by default is 'messages' ->setTranslationDomain('admin') // set this option if you prefer the page content to span the entire // browser width, instead of the default design which sets a max width ->renderContentMaximized() // by default, the UI color scheme is 'auto', which means that the backend // will use the same mode (light/dark) as the operating system and will // change in sync when the OS mode changes. // Use this option to set which mode ('light', 'dark' or 'auto') will users see // by default in the backend (users can change it via the color scheme selector) ->setDefaultColorScheme('dark') // instead of magic strings, you can use constants as the value of // this option: EasyCorp\Bundle\EasyAdminBundle\Config\Option\ColorScheme::DARK // by default, all backend URLs are generated as absolute URLs. If you // need to generate relative URLs instead, call this method ->generateRelativeUrls() ->setLocales(['en','fa']) // to further customize the locale option, pass an instance of // EasyCorp\Bundle\EasyAdminBundle\Config\Locale ; } public function configureMenuItems(): iterable { return [ MenuItem::linkToDashboard('پیشخوان', 'fa fa-home'), MenuItem::section('پست بلاگ'), MenuItem::linkToCrud('دسته بندی', 'fa fa-tags', Tree::class), MenuItem::linkToCrud('محتوا', 'fa fa-file-text', Post::class), MenuItem::section('کاربران'), MenuItem::linkToCrud('کاربران', 'fa fa-user', User::class), ]; } }