|
|
|
@ -19,4 +19,10 @@ final class PostController extends BaseController |
|
|
|
$id = $this->request->getAttribute('id'); |
|
|
|
$id = $this->request->getAttribute('id'); |
|
|
|
return $this->returnResponse($id ? "Post $id" : "All posts"); |
|
|
|
return $this->returnResponse($id ? "Post $id" : "All posts"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function hi(): ResponseInterface |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->returnResponse("Hi, guys!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |