Last active
February 28, 2016 19:47
-
-
Save andevsoftware/62d86518ddad316b2725 to your computer and use it in GitHub Desktop.
Phalcon REST - Create array response
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 | |
class CustomController extends \PhalconRest\Mvc\Controller\Fractal | |
{ | |
public function authenticate() { | |
// Authentication code here | |
// We've successfully created a session | |
return $this->createArrayResponse([ | |
'token' => $session->getToken(), | |
'expires' => $session->getExpirationTime() | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment