mckenziearts / laravel-notify

Flexible Flash notifications for Laravel
Other
1.62k stars 189 forks source link

Doesn't work with the Laravel 8 and Livewire #48

Closed martio closed 1 year ago

martio commented 3 years ago

Hi,

When I use a Livewire component in the view, it doesn't work. When I remove a Livewire component, a notification appears on the website.

<!doctype html>
<html lang="en">
<head>
    <!-- Scripts -->
    <script src="{{ mix('js/app.js') }}" defer></script>

    <!-- Styles -->
    <link href="{{ mix('css/app.css') }}" rel="stylesheet">

    @livewireStyles
    @notifyCss
</head>
<body>
    <div>
        @yield('content')
    </div>

    @include('notify::messages')

    @livewireScripts
    @notifyJs
    @stack('scripts')
</body>
</html>
@extends('layouts.app')

@livewire('season.show')
@livewire('counter')
unohuim commented 3 years ago

total newbie here.. but shouldn't the @livewire component calls be between @livewireStyles and @livewireScripts, at the very least between body tags?