riettotek/flashmsg 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

riettotek/flashmsg

Composer 安装命令:

composer require riettotek/flashmsg

包简介

Optional package for Laravel to implement global alert messages

README 文档

README

A good way to implement global alert messages in a laravel project

Usage

In a controller you can call static methods shown below.

FlashMsg::info('Just a plain message.');
FlashMsg::success('Item has been added.');
FlashMsg::warning('Service is currently under maintenance.');
FlashMsg::danger('An unknown error occured.');

Install - How to patch in

  1. run the command below
composer require riettotek/flashmsg
  1. If dont have auto discover, paste this line within providers array in config/app.php
    Riettotek\FlashMsg\Providers\FlashMsgServiceProvider::class
  1. Render the messages. You can do it in three different ways:
  • with this directive. U can customize the markup html in the config/flashmsg.php file
 @alertsmsg

you got to publish the config file with this command:

php artisan vendor:publish --provider="Riettotek\FlashMsg\Providers\FlashMsgServiceProvider" --tag=config
  • via facade already autoloaded u can store the messages in a variable and then loop through that
{{ $alerts = FlashMsg::messages() }}
  • Publish the blade component in your project components folder
php artisan vendor:publish --provider="Riettotek\FlashMsg\Providers\FlashMsgServiceProvider" --tag=view

then use that like so:

<x-renderalerts/>

By publishing the view component (be aware that u dont have another blade file named 'renderalerts.blade.php' in the component folder)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固