承接 genxbe/kirby3-ray 相关项目开发

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

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

genxbe/kirby3-ray

最新稳定版本:2.0.4

Composer 安装命令:

composer require genxbe/kirby3-ray

包简介

Helper tool that enables ray on all the extendable methods.

README 文档

README

Helper tool that enables ray on all extendable methods.

Ray is the fantastic dump debugger from our friends at Spatie. You can find more information about Ray on https://myray.app/.

Important note for Kirby > 3.7 < 5.0

This plugin overrides the dump helper from Kirby core. Please put the following at the top of your index.php.

define('KIRBY_HELPER_DUMP', false);

Options

By default the ray helper won’t be enabled, you can enable it by setting debug to true or by adding the enabled option in the config file.

# site/config/config.php
return [
  'debug' => true,

  // OR //

  'genxbe.ray.enabled' => true,
];

Usage

Add ->ray() after the page, field, or other object you want to parse in ray. This helper doesn’t interrupt your flow so whatever you are doing will still work if you add the helper. Pass a color as parameter if you want to enable color filtering in ray.

Examples

<?php
  // Parse page in ray
  $myField = $page->ray()->myField();

  // Parse page in ray with the blue color filter active
  $myTitle = $page->ray('blue')->myTitle();

  // Parse the page and the field in ray
  $projects = $page->ray()->projects()->ray();
?>

<?= $site->seoOgImage()->ray() ?>

<?= $site->footerLinks()->toStructure()->ray() ?>

<?= $site->footerLinks()->ray('red')->toStructure()->ray('blue') ?>

Installation

Download

Download and copy this repository to /site/plugins/kirby-ray.

Git submodule

git submodule add https://github.com/genxbe/kirby-ray.git site/plugins/kirby-ray

Composer

composer require genxbe/kirby-ray

License

MIT

Credits

统计信息

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

GitHub 信息

  • Stars: 22
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-22