• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question lexical error on routes.php

LesyReeds

New Pleskian
I am a beginner in this, please bear with me. I want to run a driving school system on local host xampp, but i am getting this error when i am trying to load the page:

Fatal error: Cannot use lexical variable $router as a parameter name in C:\xampp\htdocs\driving\src\routes.php on line 22
Code snippet:
Router::group(function ($router) use ($router) {
$router->exceptionHandler(Handler::class);

Router::group(function ($differentVariableName) use ($router) {
$innerRouter = $router; // Assign the value of $router to $innerRouter
$innerRouter->middleware(Simcify\Middleware\Authenticate::class);
});

});

I tried to change the parameter name, but still getting the same error. Please assist. Thank you in advance
 
Back
Top