Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class MyController
- {
- public function getUserInfo(Request $request)
- {
- $userInfo = $this->getUser()->getBasicInfo();
- if($request->isXmlHttpRequest()) {
- return new JsonResponse([
- 'success' => true,
- 'error' => null,
- 'userInfo' => $userInfo
- ], 200);
- }
- return $this->render('templates/userIno.html', [
- 'userInfo' => $userInfo
- ]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement