/login doesn't output the correct page layout

What seems to be the problem:

The problem is that when I’m on “/register” I have a link to redirect to “/login”… But the problem is that /register and /login display the same thing, knowing that I have two separate .blade.php files for both.

Are you using the latest version of Livewire:
Yes, 2.4

Do you have any screenshots or code examples:

The page layout stays the same, but the URL changes /register to /login BUT not the page layout

Hey, @dagrv

This is not a livewire issue. This is the basics of laravel.

You can take a look here in the docs to get a better idea on how routes work

Well… It maybe is because it works fine for /registration and not for /login

I forgot to include the routes/web.php file, here it it.

Route::get('/login', Login::class)->name('auth.login');
Route::get('/register', Register::class)->name('auth.register');

Look at the Register::class view file

It has everything like Login::class should be ok


namespace App\Http\Livewire\Auth;

use Livewire\Component;

class Login extends Component {
    public $email = '';
    public $password = '';

    public function login() {
        $credentials = $this->validate([
            'email' => 'required|email',
            'password' => 'required',

        if (!auth()->attempt($credentials)) {
            $this->addError('email', trans('auth.failed'));


        return redirect()->intended('/');

    public function render() {
        return view('livewire.auth.login');

I think your register/register page has the auth Middleware somewhere.

Just double check the code and you will find the issue. Cause I don’t see anything strange in your code.