2016-07-28 19 views
4

ich eine Laravel 5 app bin entwickeln, ich habe diesen WegLaravel5: Redirect :: to() außerhalb Link NotFoundHttpException in RouteCollection.php

Route::get('/go','[email protected]'); 

und in diesem UrlController.php, habe ich diese Index-Methode

public function index(){ 
    return Redirect::to('www.google.com',302); 
} 

, wenn ich diese uRL testen http://localhost:8000/go es zu ändern, nur um http://localhost:8000/www.google.com und haben diesen Fehler NotFoundHttpException in RouteCollection.php line 161 so, was das Problem ist, Dank

+0

versuchen http hinzufügen sollte hinzufügen: // vor dem www.google.com – LudgerP

Antwort

3

Sie Protokoll vor dem www.google.com

public function index(){ 
    return Redirect::to('https://www.google.com',302); 
} 
+0

Das ist richtig, Dank –