承接 wvandeweyer/tall-flash 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wvandeweyer/tall-flash

Composer 安装命令:

composer require wvandeweyer/tall-flash

包简介

Flash notifications using the TALL stack

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a package to send flash messages in a Laravel app via either the session storage or via Livewire.

Usage

Usage via session storage

class MyAwesomeController
{
    public function store()
    {
        // ......
        flash()->success('Hooray, we have saved your input');
        // ....
    }
}

Livewire Flash Message

To flash a message via Livewire, you must chain livewire($this). This will emit the information to the Flash notification component.

public function livewireMethod()
{
    flash()->info('I want to share this info message.')->livewire($this);
}

Dismissable Messages

Messages can be dismissible when chaining dismissable() or not dismissable by chaining notDismissable() or dismissable(false)

By default the messages will be dismissable. The default can be changed by publising the config file and changing the defaults.dismissable value.

The package uses AlpineJS to hide the message in this case.

Display Messages

You can display the messages by including this Livewire component in your template. It will display messages stored in the session, as well as messages emitted via Livewire.

<livewire:flash-message />

Message types

By default following levels are defined, but can be changed in the config file.

  • info
  • error
  • warning
  • success

When adding a level, you must also update the view flash-message.blade.php . The styles are included in the blade file for the sole reason Tailwind will scan it when purging classes.

Installation

You can install the package via composer:

composer require wvandeweyer/tall-flash

You can publish the config file with:

php artisan vendor:publish --provider="Wvandeweyer\Flash\FlashServiceProvider"

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security related issues, please email wim@wimvandeweyer.be instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固