Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
feat : changed string call to interface (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
prisis authored Nov 22, 2019
1 parent afca4d4 commit 4d70268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Resource/Http/web.php.stub
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ declare(strict_types=1);
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Viserio\Component\Http\Response\HtmlResponse;
use Viserio\Contract\View\Factory as ViewFactoryContract;

/** @var \Viserio\Component\Routing\Router $router */

$router->get('/', function (ServerRequestInterface $request, ContainerInterface $container) {
$view = $container->get('view');
$view = $container->get(ViewFactoryContract::class);

return new HtmlResponse((string) $view->create('welcome', ['lang' => 'en']));
});

0 comments on commit 4d70268

Please sign in to comment.