Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    [Bagisto v2.2.0] Redirection to the current page after login

    Knowledge Base
    2
    2
    126
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mt-yw last edited by

      Re: How to give page redirection to the current page after login

      I've tried

       if (auth()->guard('customer')->check()) {
                  return redirect()->route('customer.profile.index');
              } else {
                  $intendedUrl = url()->previous();
      
                  session()->put('url.intended', $intendedUrl);
      
                  return view($this->_config['view']);
              }
      

      but got

      Undefined property: Webkul\Shop\Http\Controllers\Customer\SessionController::$_config error.

      Does anyone know how should I change $this->config(['view']) for the bagisto v2.2.0?

      1 Reply Last reply Reply Quote 0
      • S
        shivendra-webkul last edited by

        Hi,

        Thank you for connecting with us.

        You can simply use the following in place of returning the view:

        return redirect()->back();

        This will redirect the user to the previous (or current) page.

        Best regards,
        Webkul Bagisto Team

        1 Reply Last reply Reply Quote 0
        • First post
          Last post