Created
November 16, 2020 11:54
-
-
Save merltron-pa/1c2414e4eb703f76ad0d576d8eb7f73f to your computer and use it in GitHub Desktop.
PHP/JMS Article: Use Maker Bundle to Create Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Routing\Annotation\Route; | |
class TestAddressController extends AbstractController | |
{ | |
/** | |
* @Route("/test/address", name="Test_Address") | |
*/ | |
public function index(): Response | |
{ | |
return $this->json([ | |
'message' => 'Welcome to your new controller!', | |
'path' => 'src/Controller/TestAddressController.php', | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment