File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed
Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,19 @@ controllers:
33 path : ../src/Controller/
44 namespace : App\Controller
55 type : attribute
6+
7+ index :
8+ path : /
9+ methods : GET
10+ controller : App\Controller\IndexController::index
611
712get_categories :
813 path : /categories
914 methods : GET
10- controller : ' App\Controller\CategoryController::getCategories'
15+ controller : App\Controller\CategoryController::getCategories
1116
1217get_products :
1318 path : /products
1419 methods : GET
1520 defaults :
16- _controller : ' App\Controller\ProductController::getProducts'
21+ _controller : App\Controller\ProductController::getProducts
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace App \Controller ;
4+
5+ use Psr \Log \LoggerInterface ;
6+ use Symfony \Bundle \FrameworkBundle \Controller \AbstractController ;
7+ use Symfony \Component \HttpFoundation \Response ;
8+
9+ //added just because New Relic<->Symfony needed it
10+ class IndexController extends AbstractController
11+ {
12+ private $ logger ;
13+
14+ public function __construct (LoggerInterface $ logger )
15+ {
16+ $ this ->logger = $ logger ;
17+ }
18+
19+ /**
20+ * @Route("/", name="index")
21+ */
22+ public function index (): Response
23+ {
24+ $ this ->logger ->info ('Homepage accessed ' );
25+ return new Response ('Welcome to the PHP SDK Demo App ' );
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments