定制 f1uder/laravel-notification 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

f1uder/laravel-notification

最新稳定版本:1.2.1

Composer 安装命令:

composer require f1uder/laravel-notification

包简介

Laravel Livewire Notification (+ AlpineJS)

README 文档

README

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

Laravel Livewire Notification

Installation

You can install the package via composer:

composer require f1uder/laravel-notification

Publish the config file with:

php artisan vendor:publish --tag="laravel-notification"

Add css file (notification.css)

@import "../../public/vendor/laravel-notification/css/notification.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

Add code to template, after body tag

<body>
  <livewire:laravel-notification.notice/>
  ...
</body>

Usage Laravel

return redirect('/')->notice('message text', 'alert');
return redirect()->route('home')->notice('message text', 'info');

Usage Livewire component

$this->notice('message text', 'alert');
return redirect('/')->notice('message text', 'alert');

Usage alpineJS

$dispatch('notice', {message: 'message text', type: 'alert'});

Arguments

Usage: notice($message, $type, $timer, $title)

  • $message - Message.
  • $type - Notification type.
    • alert
    • info - default
    • success
  • $timer - 3000 default = 3 sec.
  • $title - Notification header. Default = null.

Config

config/notification.php

  • $timer - Notification display time in seconds.
  • $position - Notification position.
    • tr - Top right (default).
    • tl - Top left.
    • br - Bottom right.
    • bl - Bottom left.

License

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固