Slim 3 Middleware Redirect
问题 I want to check if a user is logged in. Therefor I have an Class witch returns true or false. Now I want a middleware which checks if the user is logged in. $app->get('/login', '\Controller\AccountController:loginGet')->add(Auth::class)->setName('login'); $app->post('/login', '\Controller\AccountController:loginPost')->add(Auth::class); Auth Class class Auth { protected $ci; private $account; //Constructor public function __construct(ContainerInterface $ci) { $this->ci = $ci; $this->account =