Created
May 19, 2018 18:08
-
-
Save pedroresende/1801efb8645debded668b8128aef0bb7 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 | |
// src/Controller/HomeController.php | |
namespace App\Controller; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Routing\Annotation\Route; | |
use App\Service\ConfigGenerator; | |
use App\Service\StoreFactory; | |
class HomeController | |
{ | |
private $config; | |
private $store; | |
public function __construct(ConfigGenerator $config, StoreFactory $store) | |
{ | |
$this->config = $config; | |
$this->store = $store; | |
} | |
/** | |
* @Route("/") | |
*/ | |
public function index() | |
{ | |
$number = mt_rand(0, 100); | |
$config->get(); | |
return new Response('<html><body>x</body></html>'); | |
#$this->render('lucky.twig', array( 'number' => $store->id,)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment