New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

zys/livewire-alert

livewire alert 组件
10 1
Install
composer require zys/livewire-alert:dev-main
License:MIT
Last Updated:Jan 6, 2021
Links: GitHub  ·  Packagist
Maintainer: zys

livewire-alert

Build Status Packagist License

livewire alert 组件.

Installing

$ composer require zys/livewire-alert -vvv

Requirements

This package uses Livewire under the hood. Please make sure you include it in your dependencies before using this package.

  • PHP 7.2 or higher
  • Laravel 8
  • Livewire
  • tailwindcss

Usage

Add livewire-alert component

<body>
...
@livewire('livewire-alert')
</body>

Show message in livewire component


public function showMessage()
{
    ...
    $this->alert('info', 'Message~', ['content' => 'Message Content', 'timeout' => 3000]);
}

Show Message in javascript

window.livewire.emitTo('livewire-alert', 'livewireAlert', {
    type: 'info',
    message: 'Message',
    options: {
        content: 'Message content~',
        timeout: 3000,
    }
})

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT

Related Packages

livewire/flux

The official UI component library for Livewire.

13,124,657 978
infyomlabs/adminlte-templates

AdminLTE templates for InfyOm Laravel Generator

1,656,047 266
garygreen/pretty-routes

Pretty routes for Laravel 5+

1,419,357 650
infyomlabs/swagger-generator

Swagger Generator for InfyOm Laravel Generator

1,128,573 114
snowfire/beautymail

Send beautiful html emails with Laravel

781,666 1,312