Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rebirthtobi's avatar

How to change the view path of Laravel 5.4 auth

Please i need to know which variable to declare or method to override so that i can change the view path of Laravel 5.4 built in auth controllers, (Login, Register, Reset, ForgotPassword)

0 likes
4 replies
Snapey's avatar

Supposing then that for some reason, the resources/views/auth path for the files does not work for you then you probably need to pull the relevant methods from the various traits into your auth controllers and overwrite view calls

rebirthtobi's avatar

i am actually changing the folder structure and also its those method that i need to override am looking for.

Snapey's avatar
Snapey
Best Answer
Level 122

look in the authentication controller, you will see it loads authenticatesUsers.php. You can see the full namespace in the use statement and this should mirror the path in the vendor folder

Look in the trait. the very first method in the trait is this

     * Show the application's login form.
     *
     * @return \Illuminate\Http\Response
     */
    public function showLoginForm()
    {
        return view('auth.login');
    }

duplicate this into your login controller and change the path to the view.

Repeat for the other forms

1 like

Please or to participate in this conversation.