Closed ikwijaya closed 7 years ago
You seem to be using the 3.x version which does not have stable release yet. Your code above is for the 2.x version. To fix the problem you can install the 2.x version.
Alternatively if you already want to use the new 3.x version see the 3.x README for documentation. Some things such as the classname have changed. Changes are rather small though.
dear master,
i use Slim v3. but i found error middleware not found. here my require
"require": { "slim/slim":"^3.0", "tuupola/slim-jwt-auth": "^3.0@RC", "monolog/monolog": "^1.23" },
and here my example code`use Monolog\Logger; use Monolog\Handler\RotatingFileHandler; use \Slim\App; use \Slim\Container; use \Slim\Middleware\JwtAuthentication;
$config = new \Slim\Container(Config::get('settings')); $this->route = new \Slim\App($config); $this->logger = new Logger('slim'); $this->rotating = new RotatingFileHandler(Config::get('path_log') . "slim.log", 0, Logger::DEBUG); $this->logger->pushHandler($this->rotating);
`
and error here
Fatal error: Uncaught Error: Class 'Slim\Middleware\JwtAuthentication' not found in /home/wksadm/APPS/my_framework/backend/routes/Routes.php:40 Stack trace: #0 /home/wksadm/APPS/my_framework/backend/index.php(5): Routes->__construct() #1 {main} thrown in /home/wksadm/APPS/my_framework/backend/routes/Routes.php on line 40
what version slim i will use?
thanks for advance. ik