<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[laravel redirect to wrong url after auth success]]></title><description><![CDATA[<p dir="auto">guys I need a help, I deployed a laravel app inside domain/external folder and in the laravel app index.php i changed the paths to /../external/storage etc.<br />
when I go to the domain it will redirect me to domain/external perfectly but however after I login in the laravel app the Auth module will redirect me to domain/ instead of domain/external<br />
how to fix it,<br />
I already tried this inside authcontroller but won't work<br />
protected function redirectTo()<br />
{<br />
return '/path';<br />
}</p>
]]></description><link>https://lankadevelopers.lk/topic/897/laravel-redirect-to-wrong-url-after-auth-success</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 12:16:34 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/897.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 06 Mar 2022 16:57:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to laravel redirect to wrong url after auth success on Mon, 14 Mar 2022 03:02:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/130">@lkdev</a> bro in my laravel app there is only authController regarding login, is it normal? however I solved the issue, the issue was the subdomain which I was given was inside another subdomain so the laravel app goes crazy, so what I did was created a separate subdomain in a new hosting and tried, and that worked.</p>
]]></description><link>https://lankadevelopers.lk/post/4692</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4692</guid><dc:creator><![CDATA[KrissSachintha]]></dc:creator><pubDate>Mon, 14 Mar 2022 03:02:13 GMT</pubDate></item><item><title><![CDATA[Reply to laravel redirect to wrong url after auth success on Tue, 08 Mar 2022 14:02:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/922">@krisssachintha</a></p>
<p dir="auto">overide login function.</p>
<p dir="auto">inside login controller (app/Http/Controllers/Auth/LoginController.php)</p>
<pre><code>&lt;?php
  
namespace App\Http\Controllers\Auth;
  
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Auth;
   
class LoginController extends Controller
{
    /*
    |--------------------------------------------------------------------------
    | Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles authenticating users for the application and
    | redirecting them to your home screen. The controller uses a trait
    | to conveniently provide its functionality to your applications.
    |
    */
  
    use AuthenticatesUsers;
  
    /**
     * Where to redirect users after login.
     *
     * @var string
     */
    protected $redirectTo = RouteServiceProvider::HOME;
   
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this-&gt;middleware('guest')-&gt;except('logout');
    }
  
     /**
     * Write code on Method
     *
     * @return response()
     */
    public function login(Request $request)
    {
        $request-&gt;validate([
            'email' =&gt; 'required',
            'password' =&gt; 'required',
        ]);
     
        $credentials = $request-&gt;only('email', 'password');
        if (Auth::attempt($credentials)) {
  
            return redirect()-&gt;route('home');
        }
    
        return redirect("login")-&gt;withSuccess('Oppes! You have entered invalid credentials');
    }
}
</code></pre>
]]></description><link>https://lankadevelopers.lk/post/4689</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4689</guid><dc:creator><![CDATA[lkdev]]></dc:creator><pubDate>Tue, 08 Mar 2022 14:02:25 GMT</pubDate></item></channel></rss>