Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- final class TestController extends SomeBaseController
- {
- private $someService;
- public function __construct(SomeService $someService)
- {
- parent::__construct($someService);
- $this->someService = $someService;
- }
- public function test(Request $request): JsonResponse
- {
- $type = $request->request->get('type');
- $event = $request->request->get('event');
- //Now you can manipulate this vars.
- $this
- ->someService
- ->execute($type, $event);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement