masmerise / livewire-toaster

Beautiful toast notifications for Laravel / Livewire.
MIT License
342 stars 22 forks source link

Toasts Not Firing #15

Closed temwa closed 11 months ago

temwa commented 11 months ago

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

My resources/js/app.js 2

This is my tailwind.config.js. I am not sure if I did this one right? 3

This is my function call from a controller 4

Thanks

mabdullahsari commented 11 months ago

Can you try Toaster::info('Company created'); instead?

temwa commented 11 months ago

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('/'); }

mabdullahsari commented 11 months ago
temwa commented 11 months ago
mabdullahsari commented 11 months ago

Are 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?

temwa commented 11 months ago

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.

mabdullahsari commented 11 months ago

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.

temwa commented 11 months ago

Yes please. Thank you. I just sent you an invite for the repo.

temwa commented 11 months ago

The SQL Dump is in the root folder.

mabdullahsari commented 11 months ago

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?

temwa commented 11 months ago

Sure. I have made the repo public.

https://github.com/temwa/go/

mabdullahsari commented 11 months ago

@temwa What browser are you using to work on your app? Safari?

temwa commented 11 months ago

I have Safari, but I am using Chrome.

mabdullahsari commented 11 months ago

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.

temwa commented 11 months ago

I was not aware of these declarations being required. Thank you very much. I really appreciate your assistance.