Group methods in other files

Today all methods created using Slim are within index.php, however, this makes it very large and difficult to manage.

Is it possible to separate the methods in other files and call them within the main structure?

Like the example below:

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;

require __DIR__ . '/../vendor/autoload.php';

$app = AppFactory::create();

$app->get('/hello/{name}', function (Request $request, Response $response, array $args) {
    $name = $args['name'];
    $response->getBody()->write("Hello, $name");
    return $response;

require_once './customers/methods.php';
require_once './sales/methods.php';
require_once './city/methods.php';


It is, but you should consider using separate RequestHandler classes for route definition such as shown here Routing - Slim Framework.