Closed temwa closed 11 months ago
Can you try Toaster::info('Company created');
instead?
I'm not sure how to do it since there is a redirect, but I have done as below and still nothing happens.
public function testToast() { Toaster::info('Company created'); return redirect('/'); }
<x-toaster-hub />
should be placed right before the closing <body>
tag, but you include that in your JavaScript scripts..?web
middleware?app.js
bundle properly?</body>
closing tag using the reference @include('inc.scripts')
that is why I added <x-toaster-hub />
thereapp.js
bundle properly with @vite(['resources/css/app.css', 'resources/js/app.js'])
in the head sectionAre you sure Livewire is working properly? If yes, make sure you are not double redirecting otherwise the toasts in the session get lost.
Can you also run php artisan route:list
and tell me which middleware the route is actually making use of?
I have tested Livewire and it appears to be fine. I have one redirect in the function and the redirected route returns a view.
The route is using the web
middleware.
I have tested Livewire and it appears to be fine. I have one redirect in the function and the redirected route returns a view.
The route is using the
web
middleware.
Okay. I'm afraid there's still something wrong with your setup. Can you please create a minimal reproduction repository so I can inspect what's going wrong? Thanks.
Yes please. Thank you. I just sent you an invite for the repo.
The SQL Dump is in the root folder.
Yes please. Thank you. I just sent you an invite for the repo.
I'm sorry. Can you please create a public repository which I can clone without having to join another organization?
Sure. I have made the repo public.
@temwa What browser are you using to work on your app? Safari?
I have Safari, but I am using Chrome.
You should add
@tailwind base;
@tailwind components;
@tailwind utilities;
in your app.css
file... This problem has nothing to do with my library. Please be more careful next time.
I was not aware of these declarations being required. Thank you very much. I really appreciate your assistance.
Hi,
I have followed the instructions but the toasts are not firing. Please assist.
This file is included on the page before close of body tag![1](https://github.com/masmerise/livewire-toaster/assets/8055049/e5588c08-9943-4cfd-8136-d9dd7d90f2ef)
My resources/js/app.js![2](https://github.com/masmerise/livewire-toaster/assets/8055049/960ebb0e-9bf2-47ee-835d-7e3b83b0d4df)
This is my tailwind.config.js. I am not sure if I did this one right?![3](https://github.com/masmerise/livewire-toaster/assets/8055049/0c228b27-b4d4-4878-b7d4-5760f7028f77)
This is my function call from a controller![4](https://github.com/masmerise/livewire-toaster/assets/8055049/ae2e9cfa-beee-48af-85a7-89574137b64b)
Thanks