public function to($path, $status = 302, $headers = [], $secure = null) { $path = $this->generator->to($path, [], $secure); return $this->createRedirect($path, $status, $headers); }
public function filter(Route $route, Request $request) { if ($this->auth->check()) { $config = $this->config->get('c::redirect-login'); $url = $config ? $this->url->to($config) : '/'; return $this->redirect->to($url); } }