Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Oct 13, 2024
1 parent 1c3fe7c commit 759af94
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions doc/dashboards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,21 @@ dashboard with the ``make:admin:dashboard`` command, the route is defined using

.. configuration-block::

.. code-block:: php-attributes
.. code-block:: php-annotations
// src/Controller/Admin/DashboardController.php
namespace App\Controller\Admin;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Routing\Annotation\Route;
class DashboardController extends AbstractDashboardController
{
#[Route('/admin')]
/**
* @Route("/admin")
*/
public function index(): Response
{
return parent::index();
Expand All @@ -79,21 +81,19 @@ dashboard with the ``make:admin:dashboard`` command, the route is defined using
// ...
}
.. code-block:: php-annotations
.. code-block:: php-attributes
// src/Controller/Admin/DashboardController.php
namespace App\Controller\Admin;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
class DashboardController extends AbstractDashboardController
{
/**
* @Route("/admin")
*/
#[Route('/admin')]
public function index(): Response
{
return parent::index();
Expand Down Expand Up @@ -124,19 +124,21 @@ application, you can define an explicit route name to simplify your code:

.. configuration-block::

.. code-block:: php-attributes
.. code-block:: php-annotations
// src/Controller/Admin/DashboardController.php
namespace App\Controller\Admin;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Routing\Annotation\Route;
class DashboardController extends AbstractDashboardController
{
#[Route('/admin', name: 'some_route_name')]
/**
* @Route("/admin", name="some_route_name")
*/
public function index(): Response
{
return parent::index();
Expand All @@ -145,21 +147,19 @@ application, you can define an explicit route name to simplify your code:
// ...
}
.. code-block:: php-annotations
.. code-block:: php-attributes
// src/Controller/Admin/DashboardController.php
namespace App\Controller\Admin;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;
class DashboardController extends AbstractDashboardController
{
/**
* @Route("/admin", name="some_route_name")
*/
#[Route('/admin', name: 'some_route_name')]
public function index(): Response
{
return parent::index();
Expand Down

0 comments on commit 759af94

Please sign in to comment.