public function redirectIntended()
    {
        // Make sure we have a route.
        if (is_null($this->route)) {
            throw new \Exception('No route has been provided.  Please use route() to add one.');
        }

        // If this response passed, show the success message.
        if ($this->success) {
            return redirect()
                ->intended($this->route)
                ->with('message', $this->message);
        }

        // If this response failed, show the error message.
        return redirect($this->route)
            ->with('error', $this->message);
    }
public function redirectIntended()
    {
        // Make sure we have a route.
        if (is_null($this->route)) {
            throw new \Exception('No route has been provided.  Please use route() to add one.');
        }

        // If this response passed, show the success message.
        if ($this->success) {
            return redirect()
                ->intended($this->route)
                ->with('message', $this->message);
        }

        // If this response failed, show the error message.
        return redirect($this->route)
            ->with('error', $this->message);
    }
public function redirectIntended ( ) { // Make sure we have a route. if ( is_null ( $ this -> route ) ) { throw new \ Exception ( 'No route has been provided.  Please use route() to add one.' ) ; } // If this response passed, show the success message. if ( $ this -> success ) { return redirect ( ) -> intended ( $ this -> route ) -> with ( 'message' , $ this -> message ) ; } // If this response failed, show the error message. return redirect ( $ this -> route ) -> with ( 'error' , $ this -> message ) ; }
Redirect the request to the intended route or the provided one.

@return \Illuminate\Http\RedirectResponse
@throws \Exception
Redirect the request to the intended route or the provided one .