承接 dutymess/chalk 相关项目开发

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

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

dutymess/chalk

Composer 安装命令:

composer require dutymess/chalk

包简介

Easy tracepoint generator at the middle of procedures where creating breakpoints is not that easy.

README 文档

README

Packagist Downloads Github All Releases Semver license

Forks Forks

Introduction

Sometimes you need to have tracepoints inside your procedures, without breaking it with dumping some data.

Sometimes it's not very easy to use dd() or similar ways to see what's going on.

Chalk will utilize Laravel caching tools to make this work like a breeze.

Install

composer require dutymess/chalk

Simple Usage

⚠️ For security reasons, Chalk works when and only when the application is in the debug mode.

In the Tracepoint

Easily store what you want to monitor later. A timestamp is added automatically.

chalk()->write($anything);

where

  • $anything is a variable of any type, but is more efficient if provided in the type of string.

In a Safe Place

A safe place is somewhere out of your procedure. This could be a blank testing page, or simply the tinker tool in the terminal console.

Read stored data, ordered by the timestamp.

chalk()->read();

An array of stored data, together with the carbon timestamps will be returned in the form of an array.

Example

❗️ To be Added ❗️

Advanced Usage

Custom Stacks

Sometimes, there are lots of things to be traced. Putting them all in a single array would make it difficult to track the changes.

To solve this problem, you may specify a custom stack name when calling the chalk() helper.

chalk('jafar')->write('something');
chalk('jafar')->read();

Clearing Data

You may want to reset the current data and start clean at your first tracepoint.

chalk()->clear();

Of course, you may clear your data stored in the custom stacks as well.

chalk('jafar')->clear();

In some odd cases, you may want to clear all the stored data in all available stacks.

chalk()->clearAllStacks();

Custom Expire Time

By default, Chalk() stores data in the cache for just ten minutes. This should be pretty enough to see what's going on.

However, you may override this default behavior by setting a custom timeout.

chalk()::setTimeout($minutes);

License

Chalk is open-sourced and licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固