Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Livewire using main flasher #78

Closed
jonathanoeijoeng opened this issue Jun 27, 2022 · 2 comments
Closed

Livewire using main flasher #78

jonathanoeijoeng opened this issue Jun 27, 2022 · 2 comments

Comments

@jonathanoeijoeng
Copy link

Thanks for creating this awesome alert.
I saw in docs that livewire can only use toastr or sweetalert?
Is it possible to use the main flasher (the one with white background and left border color) ?

thanks

@yoeunes
Copy link
Member

yoeunes commented Jun 27, 2022

Hello Jonathan, thanks for your words.
Yes, you can use the main flasher just use the flash() helper method :

namespace App\Http\Livewire;

use Livewire\Component;

class MyComponent extends Component
{
    public function someAction()
    {
        flash()->addSuccess('notification using flasher theme');
    }

    public function render()
    {
        return view('livewire.my_component');
    }
}

@jonathanoeijoeng
Copy link
Author

Awesome!
Thanks so much for your prompt response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants