承接 rakeshthapac/laratime 相关项目开发

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

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

rakeshthapac/laratime

Composer 安装命令:

composer require rakeshthapac/laratime

包简介

Cool laravel package to broadcast database updates using websockets for realtime system

README 文档

README

Provides a cool way to make your system realtime by sending real-time database updates using WebSockets

Installation

$ composer require rakeshthapac/laratime
$ npm install laratime-js

Usage

  • Just plug one trait into your model and you are ready to go
use \rakeshthapac\LaraTime\Traits\LaraTimeable;
// now all your database updates will be broadcasted through websockets

Usage (Frontend laratime-js)

  • import laratime from laratime-js and pass it the Echo instance
// in bootstrap.js
// first create a instance of a echo with correct credentials
import LaraTime from "laratime-js";
window.laratime = new LaraTime(window.Echo);
  • Now you are ready to listen for database changes
window.laratime
  .db("users")
  .on("added", (user) => addUser(user))
  .on("updated", (user) => updateUser(user))
  .on("deleted", (user) => deletesUser(user));
  • Using laratime-js you can listen to updates of a table using db(tableName) and by chaining on(eventName) you can listen to three different events:
    • added
    • updated
    • deleted
  • You can hook a callaback which accepts the added (or updated or deleted) model as the first argument as javascript object.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固