Created
December 15, 2016 17:30
-
-
Save alexdebril/7a24acaaeb5008b4c75a37d82d4a952c to your computer and use it in GitHub Desktop.
This file contains 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 Slim\Http\Request; | |
use Slim\Http\Response; | |
class Home | |
{ | |
/** | |
* @param Request $request | |
* @param Response $response | |
* @return Response | |
*/ | |
public function hello(Request $request, Response $response) | |
{ | |
$string = $request->getParam('string'); | |
return $response->withJson(['result' => "Hello {$string}"], 200); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment