Skip to content

Support Livewire 4#207

Merged
joetannenbaum merged 12 commits intolaravel:mainfrom
livewire:support-livewire-4
Jan 14, 2026
Merged

Support Livewire 4#207
joetannenbaum merged 12 commits intolaravel:mainfrom
livewire:support-livewire-4

Conversation

@calebporzio
Copy link
Contributor

@calebporzio calebporzio commented Jan 13, 2026

File Structure Changes

Migrated from Volt components to the organization structure recommended in Livewire 4.

┌────────────────────────────────────────────┬────────────────────────────────────────────┐
│                  BEFORE                    │                   AFTER                    │
├────────────────────────────────────────────┼────────────────────────────────────────────┤
│                                            │                                            │
│  components/layouts/...                    │  layouts/...                               │
│                                            │                                            │
│  livewire/                                 │  pages/                                    │
│  ├── auth/                                 │  ├── auth/                                 │
│  │   ├── confirm-password.blade.php        │  │   ├── confirm-password.blade.php        │
│  │   ├── forgot-password.blade.php         │  │   ├── forgot-password.blade.php         │
│  │   ├── login.blade.php                   │  │   ├── login.blade.php                   │
│  │   ├── register.blade.php                │  │   ├── register.blade.php                │
│  │   ├── reset-password.blade.php          │  │   ├── reset-password.blade.php          │
│  │   ├── two-factor-challenge.blade.php    │  │   ├── two-factor-challenge.blade.php    │
│  │   └── verify-email.blade.php            │  │   └── verify-email.blade.php            │
│  └── settings/                             │  └── settings/                             │
│      ├── appearance.blade.php              │      ├── ⚡appearance.blade.php             │
│      ├── delete-user-form.blade.php        │      ├── ⚡password.blade.php               │
│      ├── password.blade.php                │      ├── ⚡profile.blade.php                │
│      ├── profile.blade.php                 │      ├── ⚡two-factor.blade.php             │
│      ├── two-factor.blade.php              │      ├── ⚡delete-user-form.blade.php       │
│      └── two-factor/                       │      ├── layout.blade.php                  │
│          └── recovery-codes.blade.php      │      └── two-factor/                       │
│                                            │          └── ⚡recovery-codes.blade.php     │
│                                            │                                            │
│                                            │                                            │
└────────────────────────────────────────────┴────────────────────────────────────────────┘

The pages in auth do not have emojis as they are not livewire components

This follows the changes drafted in the docs PR:

SCR-20260113-lvdw-2

Layout Component Syntax

Updated to use namespaces that are registered automatically by Livewire:

- <x-layouts.app :title="__('Dashboard')">
+ <x-layouts::app :title="__('Dashboard')">

View References

Updated to use namespaced paths in FortifyServiceProvider:

- Fortify::loginView(fn () => view('livewire.auth.login'));
+ Fortify::loginView(fn () => view('pages::auth.login'));

Route Definitions

Replaced Volt::route with Route::livewire in routes/settings.php:

- use Livewire\Volt\Volt;
- Volt::route('settings/profile', 'settings.profile')->name('profile.edit');
+ Route::livewire('settings/profile', 'pages::settings.profile')->name('profile.edit');

Component Base Class

Changed from Volt to standard Livewire in page components:

- use Livewire\Volt\Component;
+ use Livewire\Component;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there @calebporzio
I saw that in this and other files, it's missing to update the closing tag to replace the . with ::
I tried to do it and fix the conflicts on my end, but I can't because I don't have write permissions on the fork

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooof that's annoying sry. on it

@joetannenbaum joetannenbaum marked this pull request as ready for review January 14, 2026 16:20
@joetannenbaum joetannenbaum merged commit 9a68000 into laravel:main Jan 14, 2026
4 checks passed
@joetannenbaum
Copy link
Contributor

Thank you sir! 🫡

@jhm-ciberman
Copy link

jhm-ciberman commented Jan 17, 2026

Note: The laravel installer laravel new is still asking "Would you like to use Laravel Volt?". I intentionally selected "No" because I wanted to use the new native Livewire 4 single page class components but the installer used traditional class + view components.

$ laravel new --version
Laravel Installer 5.24.0

@1RV34
Copy link
Contributor

1RV34 commented Jan 18, 2026

This PR is making Composer struggle to extract files like resources/views/pages/settings/two-factor/���recovery-codes.blade.php, do the filenames need to contain emojis?

Edit: apparently this is a Livewire Volt thing to do? Well Composer definitely doesn't like that... (Composer using system unzip on macOS Tahoe 26.2)

Creating a "laravel/livewire-starter-kit" project at "./test"
Installing laravel/livewire-starter-kit (dev-main a0848eeac830549239187b8f4ca18214d7eb290b)
  - Installing laravel/livewire-starter-kit (dev-main a0848ee): Extracting archive
    Failed to extract laravel/livewire-starter-kit: (50) /usr/bin/unzip -qq /Users/ricardov/Herd/test/vendor/composer/tmp-33b8dbb3b7185896da65cf92c2b992c7.zip -d /Users/ricardov/Herd/test/vendor/composer/a4b26e21                                                                                                                                                                                        
                                                                                                                                                                                                               
/Users/ricardov/Herd/test/vendor/composer/a4b26e21/laravel-livewire-starter-kit-a0848ee/resources/views/pages/settings/two-factor/���recovery-codes.blade.php:  write error (disk full?).  Continue? (y/n/^C) fchmod (file attributes) error: Bad file descriptor                                                                                                                                                    
warning:  cannot set modif./access times for /Users/ricardov/Herd/test/vendor/composer/a4b26e21/laravel-livewire-starter-kit-a0848ee/resources/views/pages/settings/two-factor/���recovery-codes.blade.php                                                                                                                                                                                                           
          No such file or directory                                                                                                                                                                            
warning:  /Users/ricardov/Herd/test/vendor/composer/a4b26e21/laravel-livewire-starter-kit-a0848ee/resources/views/pages/settings/two-factor/���recovery-codes.blade.php is probably truncated         
                                                                                                                                                                                                               
    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class
Created project in /Users/ricardov/Herd/test

@hebbet
Copy link
Contributor

hebbet commented Jan 18, 2026

That is not a volt thing. It is default in livewire v4

https://livewire.laravel.com/docs/4.x/components#creating-components

@hebbet
Copy link
Contributor

hebbet commented Jan 18, 2026

Note: The laravel installer laravel new is still asking "Would you like to use Laravel Volt?". I intentionally selected "No" because I wanted to use the new native Livewire 4 single page class components but the installer used traditional class + view components.

$ laravel new --version
Laravel Installer 5.24.0

PR for Installer was closed

laravel/installer#457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants