Upgrade guide | laravel-comments | Spatie

 SPATIE

laravel-comments
================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-comments](https://spatie.be/docs/laravel-comments/v2)  Upgrade guide

 Version   v2   v1

 Other versions for crawler [v2](https://spatie.be/docs/laravel-comments/v2) [v1](https://spatie.be/docs/laravel-comments/v1)

- [ Introduction ](https://spatie.be/docs/laravel-comments/v2/introduction)
- [ Getting a license ](https://spatie.be/docs/laravel-comments/v2/getting-a-license)
- [ Requirements ](https://spatie.be/docs/laravel-comments/v2/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-comments/v2/installation-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-comments/v2/questions-issues)
- [ Changelog ](https://spatie.be/docs/laravel-comments/v2/changelog)
- [ Upgrade guide ](https://spatie.be/docs/laravel-comments/v2/upgrade)
- [ About us ](https://spatie.be/docs/laravel-comments/v2/about-us)

Basic usage
-----------

- [ Working with comments ](https://spatie.be/docs/laravel-comments/v2/basic-usage/working-with-comments)
- [ Working with reactions ](https://spatie.be/docs/laravel-comments/v2/basic-usage/working-with-reactions)
- [ Transforming comments ](https://spatie.be/docs/laravel-comments/v2/basic-usage/transforming-comments)
- [ Sending notifications ](https://spatie.be/docs/laravel-comments/v2/basic-usage/sending-notifications)
- [ Approving comments ](https://spatie.be/docs/laravel-comments/v2/basic-usage/approving-comments)
- [ Listing comments in Laravel Nova ](https://spatie.be/docs/laravel-comments/v2/basic-usage/listing-comments-in-laravel-nova)

Livewire components
-------------------

- [ Introduction ](https://spatie.be/docs/laravel-comments/v2/livewire-components/introduction)
- [ Installation ](https://spatie.be/docs/laravel-comments/v2/livewire-components/installation)
- [ Using the components ](https://spatie.be/docs/laravel-comments/v2/livewire-components/using-the-components)
- [ Taking care of authorization ](https://spatie.be/docs/laravel-comments/v2/livewire-components/taking-care-of-authorization)
- [ Customising the views ](https://spatie.be/docs/laravel-comments/v2/livewire-components/customising-the-views)
- [ Mentions ](https://spatie.be/docs/laravel-comments/v2/livewire-components/mentions)
- [ Miscellaneous options ](https://spatie.be/docs/laravel-comments/v2/livewire-components/miscellaneous-options)
- [ Using Markdown ](https://spatie.be/docs/laravel-comments/v2/livewire-components/using-markdown)

 Upgrade guide
=============

###  On this page

1. [ Upgrading spatie/laravel-comments from v1 to v2 ](#content-upgrading-spatielaravel-comments-from-v1-to-v2)
2. [ Upgrading spatie/laravel-comments-livewire from v2 to v3 ](#content-upgrading-spatielaravel-comments-livewire-from-v2-to-v3)
3. [ Upgrading spatie/laravel-comments-livewire from v1 to v2 ](#content-upgrading-spatielaravel-comments-livewire-from-v1-to-v2)

Upgrading spatie/laravel-comments from v1 to v2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No manual steps required.

Upgrading spatie/laravel-comments-livewire from v2 to v3
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

### Assets

The Blade component to load styles has been deprecated in favour of a new Blade directive:

```
-
+ @laravelCommentsLivewireStyles
```

Previously we would load the EasyMDE plugin from the CDN, we have now bundled this with our own Javascript. You should now also include this in your template with the new Blade directive:

```
@laravelCommentsLivewireScripts
```

### Mentions

Support for mentions has been added. You can enable/disable this feature in your `comments.php` config file:

```
return [
    'mentions' => [
        'enabled' => true,
    ]
];
```

This feature will only work when using the EasyMDE editor.

Upgrading spatie/laravel-comments-livewire from v1 to v2
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

v2 adds compatibility with Laravel 8 and Livewire 3.

### Remove scripts component &amp; Alpine

The `` component has been removed, you can remove this from your layout, Alpine is now included with Livewire by default, so this can be removed as well:

```
-
-
```
