Initial commit
This commit is contained in:
17
src/Silex/Controller/UserController.php
Normal file
17
src/Silex/Controller/UserController.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Silex\Controller;
|
||||
|
||||
use Silex\DI\DI;
|
||||
use Silex\Http\HttpResponse;
|
||||
|
||||
class UserController
|
||||
{
|
||||
public function index(DI $di): HttpResponse
|
||||
{
|
||||
$news = $di->getNewsGateway()->getPaginatedRecentNews();
|
||||
return new HttpResponse(200, 'home', ['news' => $news]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user