Object Route return empty

Bom dia a todos,
Sou iniciante em Slim Framework, e atualmente uso a versão 3.12 .
Esse é meu index.php com as rotas:

require 'vendor/autoload.php';

use \App\Controllers\MyController;
use Psr\Http\Message\RequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Slim\App;

$container = new Slim\Container();
        'displayErrorDetails' => true,
        'determineRouteBeforeAppMiddleware' => true,
        'debug' => true
$container["MyController"] = function(Slim\Container $container){
    return new \App\Controllers\MyController($container);

$app = new App($container);

$app->group("/admin",function(App $app){

This text will be hidden



This is my Abstract Class Controller:

namespace App\Controllers;

abstract class Controller {
    protected $values = [];
    function __construct(\Slim\Container $c) {
        $this->values["request"]   = $c->request;
        $this->values["response"]  = $c->response;
        $this->values["router"]    = $c->router;
        $this->values["container"] = $c;

    public function __get( $key )
        return $this->values[ $key ];

    public function __set( $key, $value )
        $this->values[ $key ] = $value;


This is my Concrete Class MyController:


namespace App\Controllers;
use App\Controllers\Controller;

class MyController extends Controller{
    public function index(){

I’m trying to get the name of the current route inside the index method in MyController, testing this way:
var_dump ($ this-> values [“router”]);

But the return I get is always this:

I’ve tried to do this:

But I get this error:

Is there any way to explain to me what’s going on?
I will be very grateful.
NOTE: Forgive me if I am not being clear because I am using Google Translate.

To retrieve the current route, just use the response object.

$route = $request->getAttribute('route');

// return NotFound for non existent route
if (empty($route)) {
    throw new NotFoundException($request, $response);

$name = $route->getName();