Comments (5)
@MotionPhix, another alternative I found was TALL Toasts.
I also struggled with the event not listening, without adding functionality myself to listen to the event.
Hopefully with a newer release of this package, it has a built-in event listener hook.
from laravel-notify.
I got the same Issue today, the root problem is. The package started a new instance of AlpineJS and replaced the previous AlpineJS instance that was called from app.js
. Here 👇🏻
laravel-notify/resources/js/notify.js
Lines 1 to 12 in fddde15
The quick solution is, to remove the @notifyJs
line from your layout. Then copy this code
laravel-notify/resources/js/notify.js
Lines 3 to 9 in fddde15
And paste to your main js app.js
For a long-term solution, I think someone should create a PR to add the ability to load Alpine conditionally. Or @mckenziearts can do that.
from laravel-notify.
I'm getting the same error.
For me, it conflicts with AlpineJS.
It seems like it's related to this issue: https://laracasts.com/discuss/channels/livewire/livewire-modal-freezing-page
The issue doesn't remain when I remove the @notifyJs
helper from my layout file.
Notifying does still work after removing it.
from laravel-notify.
Hello, @akunbeben, thanks for your prompt response. While the solution you showed me works, I still got one issue where the toast does not show up when it's supposed to. Like I have to refresh the page for the toast to show up which beats the whole purpose of having a toast in the first place. Is this something you have ever come across or it's an issue with my setup?
from laravel-notify.
You can't achieve that by default, using this package. This package only pushes the toast (message) to the sessions and doesn't have a listener that are listening for the toast message.
An easy way, you can use other packages such as Filament/Notifications, etc.
The hard way, create a broadcast event and listen to it using laravel echo.
from laravel-notify.
Related Issues (20)
- use margin start instead of margin left
- How to show validation error? HOT 2
- How to use with Ajax jquery
- feature/multi-duration
- Error on build
- Not working with Laravel 10 HOT 6
- Unable to locate a class or view for component [notify-messages]. HOT 6
- Overwrite css HOT 3
- Not an issue: Is there a way to add progress bar?
- Laravel 10 support? HOT 1
- Laravel 11 support? HOT 4
- couldnt install it on laravel 11 HOT 1
- dead project
- Passthrough HTML?
- Call to undefined method Mckenziearts\Notify\LaravelNotify::succces()
- display notification in jquery
- Notify Package Icons HOT 1
- Add Alpine.js animations or ability to customize with Tailwind CSS
- line 98 of readme.md maybe @include('notify::components.notify') HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-notify.