Livewire v4 released! try it →

Upgrading to Livewire 4

Brand new projects

You are good to go. Nothing to do here.

Important

There are no changes in maryUI components. This is about Livewire/Volt and has nothing to do with maryUI. For more info check the official Livewire upgrade guide here.

Do I need this?

If you use class-based components with Volt, yes.

# views/pages/users/show.blade.php
use Livewire\Volt\Component; // It extends from Volt
...
new class extends Component {
//...
}
# routes/web.php
Volt::route('/users/show', 'users.show');

What happened?

Now Livewire offers native support for class-based components. So, you need to remove Volt to avoid conflicts.

Existing projects

Make all components to extend from Livewire\Component.

# views/pages/users/show.blade.php
use Livewire\Volt\Component;
use Livewire\Component;
...
new class extends Component {
// ...
}

Change the routes at routes/web.php

// Imports
use Livewire\Volt\Volt;
...
// Routes
Volt::route('/users/show', 'users.show');
Route::livewire('/users/show', 'pages::users.show');
...

Move all the layout files.

`resources/views/components/layouts/*.blade.php` ➡️ `resources/views/layouts/*.blade.php

Change the path of the custom layouts, if you have it.

new
#[Layout('components.layouts.custom')]
#[Layout('layouts.custom')]
class extends Component {
// ...
};

Remove this entry at bootstrap/providers.php.

return [
App\Providers\AppServiceProvider::class,
App\Providers\VoltServiceProvider::class,
...
];

Remove Volt.

rm app/providers/VoltServiceProvider.php
composer remove livewire/volt

Clear the cache.

php artisan config:clear
php artisan view:clear

Made with by Robson Tenório and contributors.