symfony 4.3 code example
Example 1: create symfony 4 project
$ composer create-project symfony/website-skeleton:"^4.4" my_project_name
Example 2: symfony
<?php
// src/Controller/LuckyController.php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
class LuckyController
{
public function number(): Response
{
$number = random_int(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}
}