PHP Classes

File: src/Router/tests/Fixtures/file.php

Recommend this page to a friend!
  Packages of Wolfy-J   spiral   src/Router/tests/Fixtures/file.php   Download  
File: src/Router/tests/Fixtures/file.php
Role: Example script
Content type: text/plain
Description: Example script
Class: spiral
Modular Web application development framework
Author: By
Last change:
Date: 2 months ago
Size: 359 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

use
Spiral\Router\Loader\Configurator\RoutingConfigurator;

return static function (
RoutingConfigurator $routes): void {
   
$routes->add('index', '/')->callable(static fn() => null);
   
$routes->add('posts', '/posts')->callable(static fn() => null);
   
$routes->add('post', '/post/<id>')->callable(static fn() => null);
};