承接 laravelhungary/announcement 相关项目开发

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

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

laravelhungary/announcement

Composer 安装命令:

composer require laravelhungary/announcement

包简介

A simple way of announcements with Laravel

README 文档

README

Announcement

Laravel Announcement

A package that simplifies the management of site-wide announcements. With "Laravel Announcement" you can display auto-expiring announcements.

Installation

1- composer require laravelhungary/announcement

  • plz note that the package use predis/predis for all of its operation.

2- Add the followings to config/app.php

'providers' => [
    ...

    LaravelHungary\Announcement\PackageServiceProvider::class,
],

'aliases' => [
    ...

    'Announce' => LaravelHungary\Announcement\Facades\Announce::class,
]

3- run php artisan vendor:publish and you will get

/config/announcement.php
/views/vendor/announcement/alert.blade.php
/Events/NewAnnouncement.php
/components/Announcement-bootstrap.vue
/components/Announcement-sweetalert.vue

4- That's it.

if you need to broadcast the announcements through something like web-sockets please check Event Broadcasting

Usage

Normal

Create Announcement

Announce::create($title, $message, $type, $ttl);

Params

  • title a short message.

For example: Breaking news!

  • message A bit longer message.

For example: Our servers are under a DDoS attack. We are trying hard to mitigate it.

  • type Type of the announcement.

For example: success,info,danger,warning (or anything you would like to use) , Default is: info

  • ttl When should the announcement expire. [Time to live] in seconds.

Default is: 60 seconds

Display of Announcements

put {!! Announce::display() !!} anywhere you want your announcement to be visible.

===

Broadcasting

Create Announcement

Announce::broadcast($title, $message, $type, $ttl, $transition, $channel_name);

Params

  • title,message,type,ttl same as the normal announcement

  • transition what is animation type you want.

For example: fade , bounce, etc... Check Vue Transition , Default is: fade

  • channel_name change it to override the config value "dont forget to also change it in the component file"

Default is: public-announcement-channel

Display of Announcements

  • note that the package doesnt care what driver you use pusher or socket.io , it will just work 🍺.
  • we also use VueJs 2, but if you want to use something else then ignore the below and you are free to build your own.

1- put Vue.component('my-announcement', require('./components/Announcement-bootstrap.vue')); into your app.js file

2- put <my-announcement></my-announcement> anywhere you want this announcement to show up. For example: your layout.blade.php file

if you want to use something like Animate.css follow Custom Transition Classes

Package Maintainers

Buy us a coffee :)

Click here to lend your support to: laravel-announcement and make a donation at pledgie.com !

laravelhungary/announcement 适用场景与选型建议

laravelhungary/announcement 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 477 次下载、GitHub Stars 达 17, 最近一次更新时间为 2016 年 09 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「redis」 「laravel」 「Announcement」 「hocza」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 laravelhungary/announcement 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 laravelhungary/announcement 我们能提供哪些服务?
定制开发 / 二次开发

基于 laravelhungary/announcement 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-09-09