Illuminate\Routing\Redirector::to PHP Méthode

to() public méthode

Create a new redirect response to the given path.
public to ( string $path, integer $status = 302, array $headers = [], boolean $secure = null ) : Illuminate\Http\RedirectResponse
$path string
$status integer
$headers array
$secure boolean
Résultat Illuminate\Http\RedirectResponse
    public function to($path, $status = 302, $headers = [], $secure = null)
    {
        $path = $this->generator->to($path, [], $secure);
        return $this->createRedirect($path, $status, $headers);
    }

Usage Example

Exemple #1
1
 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);
     }
 }
All Usage Examples Of Illuminate\Routing\Redirector::to