Download the PHP package githen/laravel-common without Composer

On this page you can find all versions of the php package githen/laravel-common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-common

laravel-common

基于laravel的通用组件

image image image

安装

功能说明

服务状态检测

调用方法

可以在任务调度中直接使用

执行SQL

添加路由

  1. 可在路由配置中添加以下配置,完成SQL操作的控制器注入,并可通过访问http://host/sql/ 来执行。
  2. 可查看当前配置的数据库连通情况(暂只支持 mysql,mongo,redis),通过访问http://host/sql/check 来查看

钉钉WebHook消息发送

钉钉手册地址:官方手册

调用方法

发送消息信息

text(string $message, bool $isAll = false, array $mobilds = [], array $userIds = [])

名称 必填 类型 备注
message string 发送的消息内容
isAll bool 是否@群内所有人
mobilds array 通过手机号@群内成员,不在群内成功将被过滤
userIds array 通过userid@群内成员,不在群内成功将被过滤

发送链接消息

link(string $title, string $text, string $url, string $picUrl = '')

名称 必填 类型 备注
title string 消息标题
text string 消息内容,太长只显示部分内容
url string 点击跳转地址
picUrl string 图片地址

发送markdown类型

markdown(string $title, string $text, bool $isAll = false, array $mobiles = [], array $userIds = [])

名称 必填 类型 备注
title string 消息标题
text string 消息内容
isAll bool 是否@群内所有人
mobilds array 通过手机号@群内成员,不在群内成功将被过滤
userIds array 通过userid@群内成员,不在群内成功将被过滤

整体/独立跳转ActionCard

actionCard(string $title, string $text, array $btns, string $btnOrientation = '')

名称 必填 类型 备注
title string 消息标题
text string 消息内容,太长只显示部分内容
btns array 点击按钮,结构 [['title' => xxx, actionURL=> 'http:// *****']...]
btnOrientation string 按钮排序,0:按钮竖直排列 1:按钮横向排列

FeedCard类型消息

feedCard(array $links)

$links的结构如下:

名称 必填 类型 备注
links.title string 单条信息文本。
links.messageURL string 点击单条信息到跳转链接
links.picURL string 单条信息后面图片的URL

日志发送到钉钉

config/logging.php中添加新的配置项,以新建基于钉钉的日志通道(目前本地环境是关闭发送消息)。

可通过修改本地config中的app.evn来发送本地报警信息。

若需要此配置生效,需要在stack.channels中添加dingding关键词

日志信息查看

此扩展中已完成了基本的日志及进程等功能,需要在routes/web.php中添加路由来访问此控制器。

SSL证书到期检测

注:以定时任务每天进行触发,通知规则为离过期还有7天以内时,每天发送钉钉通知;若7-30天时则每周一发送通知。

调用方法

PHPWord生成docx文档

调整了PHPWord中TemplateProcessor生成图的一些样式问题,官方文档测试代码如下:


All versions of laravel-common with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~6.20|^8.0|^11.0
phpoffice/phpword Version ~1.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package githen/laravel-common contains the following files

Loading the files please wait ....