Macroable Component is a trait that, gives you the ability in effect to add new methods to a class at runtime.

Installation

With Composer

composer require atomastic/macroable

Usage

use Atomastic\Macroable\Macroable;

Methods

hasMacro Checks if macro is registered.
macro Register a custom macro.
mixin Mix another object into the class.
Edit this page on GitHub

Getting Started

Methods

  • hasMacro Checks if macro is registered.
  • macro Register a custom macro.
  • mixin Mix another object into the class.