Download the PHP package thoth-pharaoh/operation-record without Composer

On this page you can find all versions of the php package thoth-pharaoh/operation-record. 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 operation-record

操作記錄-收集器

版本匹配

Laravel package
8.X 2.X
9.X 3.X

安裝

你可以使用 composer 做安裝

Migrate operation_records 資料表

匯出 Migration

匯出 Config

使用方法

使用 model 關聯:

先在要使用的 model 中 引入 HasOperationRecord trait

參數 說明 類型 範例
$subject 操作對象 model Model
$funcKey 功能 KEY int 1001
$action 動做 int 1
$old 修改前內容 array ['title' => 'before']
$new 修改後內容 array ['title' => 'after']
$ip string 操作者 IP 127.0.0.1

$action 動作參數 請參閱 config.operation_record.action 內容

參數 說明 類型 範例
$operator 操作者 model Model
$funcKey 功能 KEY int 1001
$action 動做 int 1
$old 修改前內容 array ['title' => 'before']
$new 修改後內容 array ['title' => 'after']
$ip string 操作者 IP 127.0.0.1

使用 Facade:

先引入門面

參數 說明 類型 範例
$operatorId 操作者 ID int 123
$operatorType 操作者 Model 類型 string User::class
$subjectId 操作對象 ID int 456
$subjectType 操作對象 Model 類型 string Post::class
$funcKey 功能 KEY int 1001
$action 動做 int 1
$old 修改前內容 array ['title' => 'before']
$new 修改後內容 array ['title' => 'after']
$ip string 操作者 IP 127.0.0.1

queue 名稱 以 config/operation_record.php 裡設定的名稱為主

$params 內容可以自定義選則搭配,可選項目如下:

參數 欄位 說明 預設
operator['id'] 操作者 ID 一筆使用 int (ex: 1) 多筆使用 array (ex: [1, 2, 3])
operator['type'] 操作者 model 類型 model類別名稱 (ex:User::class)
subject['id'] 操作對象 ID 一筆使用 int (ex: 4) 多筆使用 array (ex: [4, 5, 6])
subject['type'] 操作對象 model 類型 model類別名稱 (ex:Post::class)
action 動做 參閱 config.operation_record.action內容
func_key 功能 KEY 一筆使用 int (ex: 1001) 多筆使用 array (ex: [1001, 1002, 1003])
begin_at 開始時間 datatime '2020-09-27 00:00:00' 當日 00:00:00
end_at 結束時間 datatime '2020-09-27 23:59:59' 當日 23:59:59
sort 時間排序 string 正序 'asc' 倒序 'desc' 'desc'
page 第幾頁 int 1 1
per_page 每頁幾筆 int 10 10

All versions of operation-record with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
illuminate/support Version >=9.0
guzzlehttp/guzzle Version ^7.1
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 thoth-pharaoh/operation-record contains the following files

Loading the files please wait ....