lundi 19 février 2018

Laravel 5.4 Redirect Not Working Correctly

I have the following __construct() in a Controller (this is simply for testing):

public function __construct( ) {

    $this->middleware( 'auth' );

    return redirect('http://www.google.com');

}

The application is not redirecting at all to the external URL, instead it just flows through and continues into the method that was called. In desperation I tried it without the return directive, but the same behavior happened. Am I missing something with the redirect call?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire