[CORE][ROUTES] Example route
This commit is contained in:
parent
7da61f8db5
commit
b396f1227a
10
config/routes.php
Normal file
10
config/routes.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
use App\Controller\NetworkPublic;
|
||||
|
||||
return function (RoutingConfigurator $routes) {
|
||||
$routes->add('network.public', '/main/all')
|
||||
->controller(NetworkPublic::class);
|
||||
};
|
16
src/Controller/NetworkPublic.php
Normal file
16
src/Controller/NetworkPublic.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
||||
use App;
|
||||
|
||||
class NetworkPublic extends AbstractController
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
return $this->render('network/public.html.twig', []);
|
||||
}
|
||||
}
|
20
templates/network/public.html.twig
Normal file
20
templates/network/public.html.twig
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
<style>
|
||||
body {
|
||||
background-color: #333;
|
||||
color: #ddd;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock %}
|
||||
{% block javascripts %}{% endblock %}
|
||||
|
||||
<h1>Imagine some notices here</h1>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user