Giter Club home page Giter Club logo

kirby3-ray's Introduction

Kirby3 Ray helper

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/.

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/kirby3-ray.

Git submodule

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

Composer

composer require genxbe/kirby3-ray

License

MIT

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.